Why a query is slow
Paste a SELECT statement and, if you know them, the columns that have an index. The page looks for the patterns that make queries slow, explains in plain words why each one costs and what to try, and ranks them so you know where to start.
Cancel anytime. How plans and refunds work
Included with Caveat Plus ($9.99 a month or $99.90 a year), Caveat Family (up to 5 people, $14.99 a month) and Caveat Teams (25 people, $199 a month). Anything you bought before stays yours.
Paste a SELECT. The worked example is an invented query over student and enrollment tables with several common problems.
Loading SQL Query Performance Explainer. If nothing appears, turn on JavaScript.
Teaching · For TeachersIncluded with Caveat Plus
A condition is sargable when the database can use an index to find matching rows. A bare column compared to a value usually is. The same column wrapped in a function, or compared with a pattern that starts with a wildcard, usually is not.
Whether a change helps depends on how big the tables are and what indexes exist. Run EXPLAIN on the original, change one thing, and run it again.
The worked examples are invented for illustration. What you type is saved only in this browser and is never sent to Caveat. Support: team@caveatacademic.com.