Speed Up the Popular Names Query SQLChallenge (46 minutes)

Speed Up the Popular Names Query SQLChallenge (46 minutes)

May 11, 2018

Speed Up the Popular Names Query SQLChallenge (46 minutes)

You’ve got a query that is just too slow! This SQLChallenge focuses on tuning a query that ranks baby names by popularity across multiple years. Your goal is to get the query under 500 logical reads by rewriting only the T-SQL (no index changes allowed). You’ll learn how to work with parameterized plans, explore quick fixes versus scalable solutions, and step through a real-world query tuning process that pushes filters down into index seeks and optimizes windowing functions.

Your challenge

Can you speed up the “Popular Names” query by ONLY making changes to the T-SQL?

Challenge difficulty

This is a 200-300 level challenge. If you have encountered this exact problem before, it could be a “quick solve,” but I’ve tested this on some smart folks who took a while to crack it!