Interface: QueryPlanResult
Defined in: src/observability/QueryPlanAnalyzer.ts:35
Parsed result of an EXPLAIN [ANALYZE] execution.
Properties
sql
sql:
string
Defined in: src/observability/QueryPlanAnalyzer.ts:37
The original SQL statement that was analyzed
provider
provider:
string
Defined in: src/observability/QueryPlanAnalyzer.ts:39
Database provider that produced the plan
executionTimeMs?
optionalexecutionTimeMs?:number
Defined in: src/observability/QueryPlanAnalyzer.ts:41
Wall-clock execution time in ms (ANALYZE only)
totalCost
totalCost:
number
Defined in: src/observability/QueryPlanAnalyzer.ts:43
Planner estimated total cost (root node)
planRows
planRows:
number
Defined in: src/observability/QueryPlanAnalyzer.ts:45
Planner estimated row count (root node)
actualRows?
optionalactualRows?:number
Defined in: src/observability/QueryPlanAnalyzer.ts:47
Actual rows at runtime (ANALYZE only)
hasSeqScan
hasSeqScan:
boolean
Defined in: src/observability/QueryPlanAnalyzer.ts:49
True when at least one Seq Scan is present — potential index opportunity
indexesUsed
indexesUsed:
string[]
Defined in: src/observability/QueryPlanAnalyzer.ts:51
Index names used across all plan nodes
hasNestedLoopWarning
hasNestedLoopWarning:
boolean
Defined in: src/observability/QueryPlanAnalyzer.ts:53
True when a Nested Loop join exceeded 10k actual rows
rawPlan?
optionalrawPlan?:string
Defined in: src/observability/QueryPlanAnalyzer.ts:55
Raw plan text (non-Postgres providers)
planTree?
optionalplanTree?:PlanNode
Defined in: src/observability/QueryPlanAnalyzer.ts:57
Parsed plan tree (PostgreSQL JSON format only)