Skip to content

Plans and indexes

Complete Labs 01–03 first.

Source reference

Several index and full-scan questions apply concepts from SQL/Query Optimization using PostgreSQL evidence and terminology.

#

A query returns 50 rows, but a plan node processes 500,000 rows. Which number is more useful for locating wasted work?

#

Which statements about EXPLAIN ANALYZE are true?

#

PostgreSQL chooses a sequential scan even though an index exists. What is the strongest first response?

#

Why does an index on sku not necessarily support WHERE lower(sku) = lower(?)?

#

For equality on customer and status followed by newest-first ordering, which candidate most directly supports the complete access pattern?

#

When can an index-only scan still perform heap fetches?

Next: Joins and estimates