The SQL Server query optimiser is incredibly good at its job. It can generate good, fast execution plans for 1 row, three table OLTP queries and 1 billion row, all the tables analytics queries and just about everything in between.

But it’s not perfect, and there are query patterns that will send the optimiser for a complete loop and the query execution times through the roof.

We’re going to look at the more common of those query patterns and see exactly what it is about them that causes problems and we’ll look at a variety of ways to write the queries so that they work with the optimiser, not against it.

Along the way you’ll learn enough about the behaviour of the optimiser to be able to identify other problematic query forms before they cause problems.
(no tags)
The video is not available to view online.