Understand SQL, one query at a time.
Write SQL in your browser and see how the database finds your rows.
SELECT id, created_at, total_cents
FROM orders
WHERE customer_id = 42
ORDER BY created_at DESC;Before the index
- SCAN
ordersReads every row in the table. -
USE TEMP B-TREE FOR ORDER BYSorts the rows in a temporary table.
After CREATE INDEX idx_orders_customer_created
- SEARCH
orders USING INDEX idx_Finds the matching rows through the index, already in order.orders_ customer_ created (customer_ id=?)
- 5 modules
- 50 exercises
- Module 1 is free
- $99 for lifetime access
- Runs in your browser
Choose where to start
SQL performance
50 exercises on indexes, joins and query plans. The first module is free.
Start the free moduleWhat the performance course covers
Plan on about 9 to 21 hours.
- Reading queriesFree10 exercises
- How queries run8 exercises
- Indexes8 exercises
- Joins12 exercises
- Sorting and grouping12 exercises
Modules 2 to 5 cost $99 once, for lifetime access. Module 1 is free.
See Modules 2 to 5All sales are final except where required by applicable law. Terms.
Frequently asked questions
Can I start without SQL experience?
Yes. The free foundations path introduces tables, SELECT, filtering, and sorting in four guided lessons. It is a starting point; the SQL performance course assumes you can already write basic queries.
Is QueryPlan video-based?
No. You learn by writing SQL, reading the query plan, and revising your query.
Why SQLite instead of PostgreSQL or MySQL?
SQLite can run real queries in your browser. The main questions transfer to other databases: Did the query scan a table, search an index, repeat a broad join, or create a temporary sort? PostgreSQL and MySQL use different plan terms and may choose different work.
Who is this for?
Start with the free foundations path if you are new to SQL. If you know the basics, the performance course helps you understand indexes, joins, and execution plans.