Findings and fixes
功能的What each finding tells you, how findings are ranked and kept quiet, the 42 checks, and the index statements written for each engine.
A finding is one problem in the plan, written as a diagnosis of the plan in front of you rather than a generic warning. It uses the plan's own tables, columns and numbers (“reads all 600K rows of orders and keeps 5,409”), says why that costs time, and says what to do next, with a statement in your engine's SQL when one applies.


Anatomy of a finding
| 部分 | What it says |
|---|---|
| Headline | The problem in one sentence: “The optimizer expected 5 rows from the read of customers and got 50.0K, off by a factor of 10,000×.” |
| 严重性 | 信息, 警告 或者 Critical. Critical is used only when the problem holds a large share of the statement 和 the statement actually ran long, so a fast query never shouts. On an estimated plan, findings that depend on real timings are lowered to Info. |
| Confidence | 高, 中等 或者 低: how directly the plan proves the diagnosis, as opposed to suggesting it. |
| Impact | How much of the statement's time (or cost, on an estimated plan) sits in this part of the plan: “About 48% of this statement's run time (270 ms)”. Findings are ordered by it. |
| 该怎么办 | The fix, plus the reason behind it, and Other options when there is more than one sensible fix. |
| SQL | The statement that applies the fix, written for your engine: CREATE INDEX with the right key order and included columns, an expression index, ANALYZE 或者 UPDATE STATISTICS, SET work_mem sized from the spill, OPTION (RECOMPILE), a rewritten date range. 复制 SQL copies it; 在新标签页中打开 puts it in a new query tab for you to review. Nothing runs by itself. |
| Evidence | The facts from the plan the finding rests on: table, filter, estimated and actual rows, loops, memory. |
| Learn more | Links to the SQL performance guides on sqlly.app that explain the problem in depth, plus the setting or statement involved. |
Clicking a finding selects the operator it points at, in every view. In the Diagram, that operator's card carries a warning mark.
How findings stay quiet when they should
- Two thresholds. Every check needs both a meaningful absolute size (rows, pages, memory) and a meaningful share of the statement. A 20-row lookup or a scan of a small table is not reported.
- Evidence only. A finding is reported only when the plan shows it. An index suggestion also says what the index will cost on writes.
- No duplicates. When two findings need the same index it is written once, a wider index absorbs a narrower one on the same table, and SQL Server's own missing-index request replaces the generic scan warning for the same operator.
- Clean plans say so: “None of the checks found a problem in this plan.”
What SQLly checks for
There are 42 checks across SQL Server, PostgreSQL, MySQL, MariaDB, Oracle, SQLite, DuckDB and ClickHouse, with engine-specific findings for CockroachDB, Trino and Spark plans too. Not every check applies to every engine; each runs where the engine's plan carries the evidence for it.
| Group | Checks |
|---|---|
| Indexes and access | A missing index, with the CREATE INDEX for it · a table scan whose filter could not use an index · a scan or seek whose filter discards most of the rows it read · per-row key lookups (and the columns to INCLUDE to remove them) · PostgreSQL heap fetches on an index-only scan · a sort an index could have avoided · an index the engine builds on the fly every run (a SQLite automatic index, a SQL Server index spool) · index merges where one composite index would do · partitions that were not pruned |
| Estimates | Row estimates far from the actual rows · parameter sniffing and plans compiled for unknown variable values · table variables estimated at one row · row goals (TOP, EXISTS, LIMIT) that made a scan look cheap |
| 统计数据 | Stale statistics, or many rows modified since they were taken · columns with no statistics at all |
| 内存 | Sorts and hashes that spilled to disk or tempdb, with a memory setting sized from the spill · memory grants far larger than used, or delayed · lossy bitmap heap scans that had to recheck rows · MySQL internal temporary tables |
| 连接 | A join with no join predicate (a cross product) · nested loops over too many outer rows · a hash join that built its table on the larger input · joins that multiply rows · MySQL block nested loop and join buffer joins |
| Predicates | Implicit type conversions on a filtered or joined column · functions wrapped around a filtered column (non-sargable conditions), with the rewritten range · a CTE materialized first and filtered after |
| Row by row | Subqueries run once per outer row · slow scalar user-defined functions · spools that replay rows |
| Parallelism | Fewer parallel workers than planned · skew, where one thread did most of the work · plans forced to run serially (a scalar UDF, a table variable, MAXDOP) |
| 配置 | PostgreSQL JIT compilation that took longer than the query · planning time that dominates execution |
| 模式 | Seven checks that need table definitions. See Schema-aware advice. |
Index statements for each engine
Suggested indexes are written in the dialect of the plan, so the statement runs as it is:
- SQL Server 得到
CREATE NONCLUSTERED INDEX与INCLUDEcolumns and a filteredWHEREwhere the plan supports one; extending an existing index usesWITH (DROP_EXISTING = ON). - PostgreSQL 得到
INCLUDEcolumns, partial indexes and expression indexes (ON customers (lower(email))). - MySQL, MariaDB, Oracle and DuckDB have no
INCLUDE, so covering columns are appended as trailing key columns. - SQLite gets partial indexes with
WHERE. - ClickHouse 没有
CREATE INDEXof this kind, so its findings describe the fix without one.
Names are quoted the way each engine expects.
Learn more links
Each finding links to the guides that explain it, for example estimated rows far from actual rows, sorts and hashes that spill to disk 或者 parameter sniffing. Operators in the details panel link to what each plan operator means, and the whole set starts at reading execution plans. When the app runs in a language other than English, a link names the kind of page and its address instead of an English title.
Ask the AI instead
解释执行计划(AI) in the command palette hands a bounded digest of the plan to the assistant for a walkthrough in conversation. In a notebook, the Plan cell's Explain with AI adds an AI cell below aimed at that plan. The findings themselves never need AI; they come from the rules described here.