Skip to main content
PProfileMatch
← Path

Database Indexing · Reading Query Plans in Database Indexing: EXPLAIN in Practice

0 XP
  1. 1 current stop: learning
  2. 2 upcoming
  3. 3 upcoming
  4. 4 upcoming
  5. 5 upcoming

Finish after stop 5

Stop 1 of 5 · Mechanic's workshop: the diagnostic screen

Trick to keep in mind+3 XP

SCAN = every row; SEARCH = a seek. Read the verb first.

SQLite's plan lines start with a verb. SCAN means walk through everything in that table or index. SEARCH means jump straight to the matching spot using an index or the row id. On a table with millions of rows, a bare SCAN is the first line to question, because it is where the time is going.

Read it once, then a question tests whether the trick stuck.