Transactions and performance
Read EXPLAIN QUERY PLAN
Ask SQLite how it plans to find rows before guessing that a query needs another index.
8 minute lesson
~~~
Prefix a query with EXPLAIN QUERY PLAN:
EXPLAIN QUERY PLAN
SELECT id, title FROM notes WHERE title = 'Plan Monday';
Look for a table scan or an index search. Measure with realistic data because a scan can be the right plan for a tiny table.
Lesson completed