Creating indexes is one of the most powerful ways to improve performance in your SQL Servers. It's not easy to form indexes for a large and complicated query, and things only get more complicated when queries can come from vendor applications, ORM tools like LINQ, or any number of other sources.
When it's time to create the perfect index, there's guidelines and strategies to get it right, and then prove that it's helping. However, performance is not always about just one index, and general index strategy can also achieve great results. We'll focus on how to get the perfect index or indexes for your workload.
I want to show you how just a little neater and tighter code can also run a lot faster. These are some of the instant performance improvements that won’t change a lot of code, won’t generate weeks of testing and validation for your colleagues and can be relatively quick to implement.
But most of all, they’ll make the code prettier and easier to understand for the next person.
We’ll look at common ways that null values, implicit datatype conversions and foreign key constraints can radically affect the performance of your queries. Inspired by an actual client case, where I tuned a 20-hour query down to a few minutes, with only a minor code change.
This presentation is all-code, some execution plans, and no-powerpoint.