Courses
SQL Advanced: Queries That Hold Up Under Load
Check Yourself: Indexes That Earn Their Cost
Five scenario questions on column order, index-only scans, partial indexes, expression indexes and exclusion constraints. If you miss more than one, reread the lessons in this section.
Course content
Join this Course
Sign in to save your progress.
-
Reading Plans
-
EXPLAIN ANALYZE: Reading a Plan Line by Line
-
Statistics, ANALYZE and Why the Planner Guesses Wrong
-
-
-
Indexes That Earn Their Cost
-
B-tree, Partial and Expression Indexes
-
GIN, GiST and BRIN: When a B-tree Is the Wrong Tool
-
-
-
Concurrency
-
MVCC, VACUUM and Table Bloat
-
Locks, SELECT FOR UPDATE and Deadlocks
-
-
-
Advanced Query Shapes
-
Recursive CTEs and Hierarchies
-
JSONB: Query Semi-Structured Data Without Regretting It
-
-
-
Running It in Production
-
Partitioning Large Tables
-
Changing a Live Table Without Locking It
-
Backup, Restore and Proving the Restore Works
-
-
- Final Check: SQL Advanced
1.
A table has an index on (customer_id, order_date) and 8 different customers. A query filters only on order_date. On PostgreSQL 18, what can happen?
2.
An Index Only Scan shows Heap Fetches: 14000 on a table that was just updated heavily. What brings the number back down?
3.
There is a partial index on orders (customer_id) WHERE status = 'new'. The application sends the query as a prepared statement with status = $1, and the plan is generic. What happens?
4.
The column email has an index, but WHERE lower(email) = 'ana@example.com' reads the whole table. What is the right fix?
5.
No two bookings for the same room may overlap in dates, and two users may book at the same moment. Which design enforces this?
About
Five scenario questions on column order, index-only scans, partial indexes, expression indexes and exclusion constraints. If you miss more than one, reread the lessons in this section.
- Duration
- 5 min
- Last update
- 09/18/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.