Posts

Showing posts with the label The cost based optimization process

Inside the SQL Server Query Optimizer - part 5 The cost based optimization process and the Rules

Image
Hi Guys, Welcome back! I hope you liked the last post of this series when we speak about trivial plan. Today we continue our topic looking at what happens next... Introduction In the last post we saw that some queries are admissible for a trivial plan while others are not. Queries that are not admissible for a trivial plan need to go through the cost based optimization process . Are you ready to enter inside the heart of the optimizer? Yes I suppose! The cost based optimization process If you remember, we have talked about this topic before. The goal of this step is to find quickly a good execution plan and not to find the best execution plan at all. During this step many important activities will be performed by the optimizer: Reading the logical tree, logical alternatives that produce the same results are explored . For each alternative: A Physical implementation is generated An estimated cost is assigned.Finally the cheapest physical solution is choosed. ...