Top 3 Execution plan Interview Questions
Browse 3 real-world technical and behavioral interview questions about Execution plan. Review scenarios, edge cases, and architectural best practices.
This table has fourteen indexes and writes have got slower. How do you work out which ones to drop?
Decide from evidence, not intuition: per-index scan counts read against the date the statistics were reset, redundancy judged by leading columns, and the constraints and foreign keys that need an index whether or not anything ever scans them. Then make the drop reversible.
Walk me through how you read a PostgreSQL execution plan.
Read the plan tree innermost-node-first, remember that EXPLAIN only estimates while EXPLAIN ANALYZE executes, multiply each node's actual rows by its loops, and treat a large gap between estimated and actual rows as the primary finding.
A query has an index on the filtered column but the plan shows a sequential scan. Walk me through how you would diagnose it.
Work outward from the plan: confirm the index is actually usable for the predicate as written, then check whether the optimiser is choosing to ignore it because of selectivity, stale statistics, or a type or collation mismatch that makes the predicate non-sargable.