EXPLAIN: make it make sense
summary
Shows how EXPLAIN and ANALYZE with PostgreSQL reveal actual vs estimated rows, uses Python/Django and RDS, and proves random_page_cost=4 keeps the planner favoring scans on cloud. Demonstrates concrete fixes: create INDEX ON upper(name) for case-insensitive lookups, install pg_trgm extension for ILIKE partial matches, run ANALYZE after adding indexes, and rewrite OR conditions as UNIONs to speed a seven-table live search — the UNION version runs 4–5× faster and the corrected JSON expression index finally lets the query use an index.
AI-written summary · about
chapters (7)
- 0:00Introduction to EXPLAIN
- 1:50Theory behind database indexes
- 8:35Practical query tuning with Django
- 12:56Index limitations and fixes
- 18:43Trigram indexes for partial text search
- 23:40Combining indexes in live search
- 27:13Q&A session
related talks
30mQuerySet.explain(): make it make sense.
29mExplaining the Postgres Query Optimizer
52mUnderstanding PostgreSQL Query Plans (aka EXPLAIN)
34mSimple and Awesome Database Tricks
40mExplaining the Postgres Query Optimizer
26mBeyond Joins and Indexes
40mThings your explain plan is not telling you
23mBest Practices for Tuning Slow Postgres Queries
