SQL Index vs Seq Scan Playground

A 100,000-card archive at the village office: SCAN or SEARCH through an index, from a real SQLite’s EXPLAIN QUERY PLAN, times and cards opened. An interactive…

Why it matters

"My query is slow" is almost always about an index, and the difference is orders of magnitude, not percent. Reading EXPLAIN and knowing when an index goes unused (a function on the column, a leading %, an index’s left column skipped) turns query tuning from guessing into deciding.

The key idea

An index is a sorted copy of a column, and it is used only when the query can search that order

Common mistakes

Try it in this playground