Seek or Scan - Cost Based Optimizer in SQL Server

Not able to access YouTube? Watch this video on MSDN Channel 9!

When SQL Server has a choice of plans, it will compare the cost among a set of execution plans and will choose the cheapest one.

In some cases, even though the cost of seek is slightly higher than the cost of scan, SQL Server Optimize might still choose a seek based plan as demonstrated in the video.

SQL Server may not evaluate all possible plans, there are various stages of optimization and SQL Server will evaluate a subset of plans at these stages.

The below video demonstrates this with hands-on example. SQLTest Tool simulates the hands-on labs for you, no registration necessary. You can practice the online hands-on example while watching the video.

Attend our upcoming SQL Server Performance Tuning Hands-on Workshop in London! Or check out other workshop locations ~

Subscribe to our Newsletter