/** * PlanDiff (v3.1) * * Structural comparison of two EXPLAIN plans: * - added: op nodes present in B but not A * - removed: op nodes present in A but not B * - changed: same op path but cost/rows/index differs * - costDelta: signed sum of cost changes (positive = slower, negative = faster) * * Plans are compared by their op-table signature (op + table + depth path), * treating index swaps and cost moves as "changed" rather than removed/added. */ import type { NormalizedPlan, NormalizedPlanNode } from './explain-parser.js'; export interface PlanDiffResult { identical: boolean; added: NormalizedPlanNode[]; removed: NormalizedPlanNode[]; changed: { key: string; from: NormalizedPlanNode; to: NormalizedPlanNode; costDelta: number; rowsDelta: number; }[]; costDelta: number; rowsDelta: number; } export declare class PlanDiff { /** Compare two normalized plans. Order doesn't matter; structure does. */ static compare(planA: NormalizedPlan, planB: NormalizedPlan): PlanDiffResult; } //# sourceMappingURL=plan-diff.d.ts.map