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.

SQLly
An expanded SQLly plan finding with SQL, evidence and Learn more linksAn expanded SQLly plan finding with SQL, evidence and Learn more links
An expanded finding: the diagnosis, how sure it is and its share of the run time, why it matters, the statement to run with Copy SQL and Open in new tab, the evidence from the plan, and Learn more links.

Anatomy of a finding

부분What it says
HeadlineThe 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.
ImpactHow 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.
SQLThe 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.
EvidenceThe facts from the plan the finding rests on: table, filter, estimated and actual rows, loops, memory.
Learn moreLinks 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.

GroupChecks
Indexes and accessA 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
EstimatesRow 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
PredicatesImplicit 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 rowSubqueries run once per outer row · slow scalar user-defined functions · spools that replay rows
ParallelismFewer 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 와 함께 INCLUDE columns and a filtered WHERE where the plan supports one; extending an existing index uses WITH (DROP_EXISTING = ON).
  • PostgreSQL 다음을 받습니다 INCLUDE columns, 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 INDEX of 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.