
What are we going to cover in this course.
Please take a quick perusal of this and other lectures to get a clearer idea on what's we will be covering in the course.
In this lecture I want to make sure you are in the right place.
This course is about the Query Optimizer and about the basics of reading execution plans.
The SQL Server Engine has two major componets.
In this lecture let's find out what they are.
When any query is issued in SQL Server a plan is created.
This plan is created via a variety of steps.
Let's talk about them in this lecture.
In this lecture we will define what a Search Space is.
How much does it cost to do all this?
Let's find out.
As a general rule we want plan cache reuse.
It's a good thing.
Let's talk about it in this lecture.
Some times new plans will have to be created.
What are a few of the major causes of recompiles?
Let's cover the new vernacular in video format.
Let's wrap up what we've covered in this section.
There is a lot new vernacular for the student starting in execution plan analysis.
Don't become frustrated or rush through the course.
This will take time.
In this lecture let's learn about the basic parts and terminology of an execution plan.
Why are operators called iterators?
Let's find out why in this lecture.
There are a variety of methods we can use to look at execution plans.
However, the vast majority use the right click approach to view them pictorially.
The two most fundamental access methods in SQL Server.
Let's define them.
The word scan in database parlance means bad.
Let's see some scans in action and learn how to spot them in this lecture.
The "seek" is the most efficient way we can navigate our structures.
Let's take a look at exactly what that is in this lecture.
One of the most common kinds of problem areas in real world plans.
Let's define them and correct them.
Aggregations aren't difficult but there are some nuances with the operators.
Let's cover them in this lecture.
What's a Hast Match operator?
In this lecture we will find out.
SQL Server uses to implement logical joins: the Nested Loops Join, the Merge Join and the Hash Join.
It is important to understand that no join algorithm is better than the others, and that the Query Optimizer will select the best join algorithm.
The merge join requires both inputs to be sorted on the merge columns, which are defined by the equality (ON) clauses of the join predicate.
Let's look at an example with a merge join.
Hash joins are used for many types of set-matching operations: inner join; left, right, and full outer join; left and right semi-join; intersection; union; and difference.
Let's learn about Hash Joins in this lecture.
Parallelism is a complicated topic.
Let's define it at a very high level in this lecture.
There are lots of new terms in this lecture.
You many want to print them out.
Let's look at the high points of this section.
Statistics refers to the statistical information about the distribution of values in one or more columns of a table or an index.
There are three key sections of the output for learning about statistics.
We will cover them in this lecture.
Let's pause for one second and keep several critical aspects of learning about statistics in mind.
There are different ways you can view the details of the statistics objects. You can use the DBCC SHOW_STATISTICS command. DBCC SHOW_STATISTICS shows the header, histogram, and density vector based on data stored in the statistics object.
Let's look at an execution plan and some stale statistics.
One of the most common operators you'll come across
You'll see it almost every day.
Let's learn what to look for and how to correct them.
We use this in conjunction with execution plan analysis.
This gives us a more granular insight into how the pages move between the buffer pool and the disk.
You can indeed add non-clustered indexes to heaps and make a dramatic improvement on your queries.
Let's look at how in this lecture.
There's no such thing as a good sort.
Let's learn how to get rid of them in this lecture.
Easy to spot, spools are a good place to improve query performance.
Congratulations!!!!!
You've completed this course on execution plan analysis.
Student Warning: Even though this is a beginners class it's fast paced and will require some outside study on your part.
I've included 4 different preview lessons so you could better gauge the speed of the course. Please take a moment to preview all of them. If those lessons are too fast then please take this course after you've taken my entry level courses. Thanks.... Mike
Recent Unsolicited Testimonials
“Learned lots from this well constructed and easy to follow course - thanks Mike!” – Caroline
“Feel much more confident in MSSQL now. Thanks!” Jef Yo
“This short course is excellent and will give you a good understanding of the basics in SQL server administration.” Luke Dunn
In this course we are going to delve into the Query Optimizer, easily one of the most complicated pieces of software ever written.
The Query Optimizer is the SQL Server component that tries to give you an optimal execution plan for your queries. The Query Optimizer tries to find that execution plan as quickly as possible. Not the perfect plan but a good one.
The SQL Server Query Optimizer is a cost-based optimizer. It analyzes a number of execution plans for a given query, estimates the cost of each of these plans, and chooses the plan with the lowest cost.
The optimizer seeks to find balance between the optimization time and the quality of the selected plan.
The course will be a balance of hands on query performance tuning and understanding the basics of the optimizer’s architecture.
We are going to learn about the execution engine, statistics and cost estimation, index selection and the optimization process.
At the core of the SQL Server Database Engine are two major components: the storage engine and the query processor also called the relational engine.
In this course our sole focus will be on the query processor. This part of the engine accepts all queries submitted to SQL Server and creates a plan for optimal execution.
See you in the course!!!