Show query plans in the Linux SQL editor

Abierto
#3,655 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@J2TeamNNL ya está trabajando en esto.

Desde el 31/10/2026.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
clickhouse, mariadb, mysql, postgresql, sql, sqlite
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Swift
Estrellas
6.2k
Forks
412
Merge medio
3 h 56 min
PR fusionados (30 d)
669

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TableProApp/TablePro

Todos los issues de TableProApp/TablePro

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.