Build your skills at tuning functions with this Level 200 problem
You get code and a video showing you the problem I created with a terrible function.
Your challenge: tune the function and query to reduce the CPU time as much as you can – without changing the table or indexes or getting rid of the function altogether.
Learn the nuances of how functions appear in execution plans and dynamic management views
Part of the trickiness with functions is seeing what they’re doing and how many times they’re being called. In the solution videos, you’ll see:
- How differently functions appear in estimated vs actual plans
- The different ways functions appear (or don’t appear) in sys.dm_exec_query_stats, sys.dm_exec_function_stats, and other DMVs
- Best practices for function performance
This SQLChallenge is designed to help you grow
Even if you’re just starting out with tuning functions, this 200 level problem will take you to level 300+ with the details the solutions teach you about how to work with execution plans and DMVs. Crack open the sample code to get the most out of the problem! If you have a hard time solving it– that’s OK. Watch the solution videos, then set yourself a calendar reminder to retry the problem in a few days.