diff --git a/src/enums.ts b/src/enums.ts index 3168a382..b4816f73 100644 --- a/src/enums.ts +++ b/src/enums.ts @@ -127,6 +127,7 @@ export enum NodeProp { AVERAGE_IO_WRITE_TIME = "*I/O Write Speed (exclusive)", WORKERS_PLANNED_BY_GATHER = "*Workers Planned By Gather", + WORKERS_LAUNCHED_BY_GATHER = "*Workers Launched By Gather", CTE_SCAN = "CTE Scan", CTE_NAME = "CTE Name", diff --git a/src/node.ts b/src/node.ts index 5c648019..1badb8c0 100644 --- a/src/node.ts +++ b/src/node.ts @@ -245,6 +245,9 @@ export default function useNode( if (node[NodeProp.WORKERS_LAUNCHED]) { return node[NodeProp.WORKERS_LAUNCHED] as number } + if (node[NodeProp.WORKERS_LAUNCHED_BY_GATHER]) { + return node[NodeProp.WORKERS_LAUNCHED_BY_GATHER] as number + } const workers = node[NodeProp.WORKERS] as Worker[] return workers ? workers.length : NaN }) diff --git a/src/services/plan-service.ts b/src/services/plan-service.ts index 12e3937f..3fcd4db1 100644 --- a/src/services/plan-service.ts +++ b/src/services/plan-service.ts @@ -89,6 +89,9 @@ export class PlanService { child[NodeProp.WORKERS_PLANNED_BY_GATHER] = node[NodeProp.WORKERS_PLANNED] || node[NodeProp.WORKERS_PLANNED_BY_GATHER] + child[NodeProp.WORKERS_LAUNCHED_BY_GATHER] = + node[NodeProp.WORKERS_LAUNCHED] || + node[NodeProp.WORKERS_LAUNCHED_BY_GATHER] } if (this.isCTE(child)) { plan.ctes.push(child)