Cheat Sheet
DATABASECHEAT SHEETS
SHEET 12
Indexes, Query Plans and Maintenance
M.R. Sterling
Database Advanced · Sheet 12
Indexes, Query Plans and MaintenanceSQLite
SCAN against SEARCH on real rows, then EXPLAIN QUERY PLAN before and after CREATE INDEX, composite and unique indexes, the substr() trap, LIKE and indexes, a VACUUM INTO backup proven by row counts, RPO and RTO, and upkeep.
$4.50Get this sheet
Or get all 6 in the Database Cheat Sheets: Advanced Pack for $19, or with the whole Health Data Clinic series in the Health Data Clinic - Complete + Cheat Sheets for $109.
Instant PDF downloadsent the moment you pay
Two A4 pagesprint front and back
SQLiteevery query runs as printed
Keep it foreverno expiry, no account
What the sheet looks like
A blurred preview, to show the layout and how much fits on the two pages. The full, print-sharp sheet comes with your download.


What is on this sheet
SCAN vs SEARCH
EXPLAIN QUERY PLAN
Keys and UNIQUE indexes
Composite index
Keep the column bare
LIKE and indexes
Lean queries
Backups, RPO and RTO
VACUUM INTO and upkeep
The books this sheet pairs with
The sheet reminds you. These books teach it, one idea at a time, with every example worked.
More Database Advanced sheets
One email when a new book lands
No schedule, no filler. Just the new titles and the odd free chapter.