[Feat]: Visual EXPLAIN: save plan snapshots and compare against a baseline

Open
#1,416 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@markankamaransheogarat-sys is already working on this.

Since Nov 6, 2026.

  • #1422 by @markankamaransheogarat-sys — closed without merging
  • #1431 by @markankamaransheogarat-sys — open

Assessment

This issue has not been assessed yet.

Description

feature request help wanted
Prerequisites
  • I have written a descriptive issue title.
  • I have searched existing issues and open pull requests to avoid duplicating an existing feature request.
🚀 Feature Proposal

Save explicit EXPLAIN snapshots with source SQL, qualified connection context, capture time and available engine/version metadata. Select an earlier same-engine snapshot as the baseline and compare parsed operators/metrics with raw-text fallback.

Motivation

An optimization loop needs a durable before/after record, not just the latest plan displayed on screen.

Example
Save a baseline, create an index separately, rerun EXPLAIN and compare the changed scan/join operators with the original.
Acceptance criteria
  • Capture snapshots without rerunning SQL implicitly; preserve exact raw output and distinguish estimated from analyzed metrics.
  • Show baseline/context identity and incompatibilities; do not compare unlike engine metrics as though their cost units were equivalent.
  • Align nodes using a documented heuristic and expose unmatched/ambiguous nodes, metric changes and raw-text fallback.
  • Support retention, explicit delete and pin/export behavior with clear treatment of SQL literals and captured plans; no credentials or result rows by default.
  • Test structural changes, duplicate operators, unavailable metrics, parser failure and estimated/analyzed mismatch; preserve desktop/web behavior.
Where to start
  • packages/web-ui/src/components/explain/VisualExplainView.tsx hosts plan views.
  • packages/explain/src/plan.ts, packages/explain/src/metrics.ts and packages/explain/src/types.ts describe plans and metrics.
  • src-tauri/src/explain_import.rs is an existing raw-plan import boundary; src-tauri/src/application/productivity.rs handles adjacent persisted productivity data.

Boundary: comparison of execution plans, distinct from schema comparison #1292, data comparison #21 and full-plan export.

Related proposals: #1400.

Contributor notes
  • Follow AGENTS.md and the repository rules. Run GitNexus upstream impact analysis before editing existing symbols and report the blast radius.
  • Add new UI strings to every locale under packages/web-ui/src/i18n/locales/; use design tokens, keyboard access and visible focus.
  • Keep pure frontend helpers under packages/web-ui/src/utils/ and tests in the matching packages/web-ui/tests/ paths. Run focused tests, typecheck and relevant repository checks.
  • Shared backend behavior belongs in src-tauri/src/application/ or plain modules. Keep Tauri code under transport/desktop/, expose shared web behavior when applicable and preserve cargo check --no-default-features from src-tauri/ for backend changes.
  • Questions? Ask here or on Discord.
Dominant language
TypeScript
Stars
5.1k
Forks
335
Avg merge
1d 11h
Merged PRs (30d)
280

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TabularisDB/tabularis

All issues in TabularisDB/tabularis

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.