You have a query with window functions over a billion-row events table, and it takes forty minutes. How would you investigate, and what would you optimize?
~4 min by voice
How to approach it
This checks whether the candidate can systematically diagnose a heavy analytical query: start with the plan, understand why a window is expensive (shuffle + sort), and reduce the cost architecturally, through data volume, the table's physical layout and incrementality, rather than "a bigger cluster".
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.