Show query plans in the Linux SQL editor

オープン
#3,655 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@J2TeamNNL がすでに取り組んでいます。

2026年10月31日 から。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
clickhouse, mariadb, mysql, postgresql, sql, sqlite
領域
databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Swift
スター
6.2k
フォーク
412
平均マージ
3時間 56分
マージ済み PR(30日)
669

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TableProApp/TablePro のほかの issue

TableProApp/TablePro の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。