segunda-feira, 14 de setembro de 2015

Seek and You Shall Scan Part I: When the Optimizer Doesn't Optimize

http://ift.tt/1FIolgv

Index Seek and Index (or Table) Scan are two of the most common operators that you see in query execution plans. A common misconception is that a scan is bad and a seek is good. The reality is that each is optimal under different circumstances. In some cases the optimizer chooses between the two based on which is indeed more optimal in the given situation. In those cases, other than appreciating the optimizer's ability to come up with the truly optimal plan, there's nothing special that we need to do. However, what's interesting to us as people who tune queries is to identify cases, or patterns, in which the optimizer doesn't make the optimal choice and act to fix them.

read more



from SQL Server Pro http://ift.tt/1kCjeYg

Nenhum comentário:

Postar um comentário

Leave your comment here!