An analytical query against Postgres that used to run in a couple of seconds now takes ten minutes. How would you investigate, and what can you do about it?
~4 min by voice
How to approach it
The interviewer wants to see whether you can diagnose query degradation in Postgres systematically: read the plan, understand why the planner changed strategy, and propose fixes ranging from quick ones (ANALYZE, an index) to architectural ones (partitioning, materialized views).
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.