SQL Query Performance Explainer

Paste an SQL query and get plain-English advice on slow patterns – SELECT *, leading-% LIKE, functions in WHERE, big OFFSET – plus an index suggestion.

Tool

Was this tool useful?

About this tool

About SQL Query Performance Explainer

Find out why a query may be slow before it reaches production. The explainer describes what the query does in plain English and checks it against well-known performance rules: functions that stop indexes being used, LIKE '%…', OR across columns, NOT IN subqueries, ORDER BY RAND(), large OFFSET pagination, comma joins without conditions, correlated subqueries, HAVING without aggregates and UPDATE/DELETE without WHERE. For simple queries it suggests a matching composite index.

How it works

Rule-based: comments and string values are removed, then the statement is checked with patterns for each anti-pattern. Index suggestion: equality columns first, then one range column, otherwise the ORDER BY columns.

Example

WHERE YEAR(created_at) = 2026 → use created_at >= '2026-01-01' AND created_at < '2027-01-01' so an index on created_at can be used.

How to use this tool

  1. Paste one or more SQL statements.
  2. Read what each does and the possible problems.
  3. Apply the suggested fixes, then confirm with EXPLAIN on your database.

Frequently asked questions

Does it run my query?

No. It only reads the text – nothing is sent to a database.

Which databases does it support?

The rules apply to MySQL/MariaDB, PostgreSQL, SQL Server and SQLite. Always confirm with your database’s EXPLAIN.

Is my data uploaded?

No. Everything is processed in your browser and stays on your device.

Does the SQL Query Performance Explainer send my data to a server?

No. The SQL Query Performance Explainer runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.