Show query plans in the Linux SQL editor

Aperta
#3,655 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@J2TeamNNL ci sta già lavorando.

Dal 31/10/2026.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
clickhouse, mariadb, mysql, postgresql, sql, sqlite
Ambito
databases

Direzione di ricerca

Start with linux/crates/core/src/statement/statement_builder.rs and the macOS reference features/explain-visualization.mdx; the issue also points to linux/ROADMAP.md. Trace how statements and results are built in the Linux app, then compare each engine’s required plan format. Done means Explain renders a PostgreSQL join as a tree with row estimates and works across the listed engines.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement platform-linux
Problem

The Linux app has no way to show a query plan. The user can type EXPLAIN in the editor and read the plan as rows of text, but nothing draws it, and each engine has its own format: text or JSON on PostgreSQL and MySQL, XML on SQL Server, a list of steps on SQLite. The only EXPLAIN in the code is a unit test (linux/crates/core/src/statement/statement_builder.rs:166).

It is not on the roadmap: neither the backlog nor the Ideas list (linux/ROADMAP.md, Backlog, Ideas) mentions it. The macOS app draws plans (features/explain-visualization.mdx).

Proposed solution
  • Explain in the editor, for the statement at the cursor or the selection, with a shortcut.
  • Each engine runs its own form: EXPLAIN (FORMAT JSON) on PostgreSQL, EXPLAIN FORMAT=JSON on MySQL and MariaDB, SET SHOWPLAN_XML ON on SQL Server, EXPLAIN on ClickHouse, and EXPLAIN QUERY PLAN on SQLite.
  • The plan shows as a tree of nodes in a results entry, built from GTK list widgets, with each node's estimated rows and cost where the engine gives them, and the costliest node marked.
  • Explain Analyze, where the engine has it, runs the statement, so it asks first. On a statement that writes, it is refused on a read-only connection and otherwise runs inside a transaction that is rolled back.
  • The raw plan text stays one click away, for copying.

Done means: on PostgreSQL, Explain on a join shows a tree with row estimates, and the same action works on the other engines with their own plan formats.

Alternatives considered

Run EXPLAIN by hand in the editor and read the rows.

Platform

Linux

Related database type

N/A / General

Lingua principale
Swift
Stelle
6.2k
Fork
412
Merge medio
3h 56m
PR unite (30g)
669

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TableProApp/TablePro

Tutte le issue di TableProApp/TablePro

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.