Seek or Scan - Cost Based Optimizer in SQL Server

Play Seek or Scan - Cost Based Optimizer in SQL Server
Sign in to queue


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.


SQL Server



Download this episode

The Discussion

Add Your 2 Cents