Sometimes bad execution plans happen to good queries
In this course you’ll learn the pros and cons of using hints, trace flags, and scoped database configuration to tune your queries in SQL Server.
This course gives you two hours of query tuning fun in online videos, with plenty of quiz questions along the way and sample interview questions at the end.
Demos are run against SQL Server 2016 in the videos, but most of the hints and settings shown in this course can be used against lower versions of SQL Server as well.
Each lesson is 15 minutes or less to make it easy for you to fit learning into your busy day.
Here’s what’s covered in the course
Why do we need hints and optimizer hotfixes? (3 minutes)
Query tuning with hints (73 minutes): Six lessons which use hints to tune a slow query. Topics include: hinting cardinality estimation, setting row goals, join hints, temp tables, table variables (and a related trace flag), query re-writes inspired by hints, and frequently used hints.
Recompile hints aren’t created equal (22 minutes): Three lessons that explain what ‘recompile’ means, a super simple load test of different types of recompile hints, understanding the impact of recompile on the plan cache, and recompile bugs and best practices.
How to “take out” an execution plan (8 minutes): One lesson on the variety of ways you can bump an execution plan (or a lot of plans) out of cache.
Query optimizer hotfixes (22 minutes): Three lessons explaining and demonstrating trace flag 4199 and hints and database scope options to enable query optimizer hotfixes.
Interview questions and answers (7 minutes)
Not sure if it’s right for you?