SQL Server - parameter sniffing

后端 未结 2 664
夕颜
夕颜 2020-11-28 13:43

I\'ve read many articles about parameter sniffing, but it\'s not clear if this is good or bad. Can anyone explain this with a simple example.

Is there a way to autom

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 14:13

    Yes, sometime it is good or bad.

    The Many time query optimizer chooses old query plan for execution because it stores this plan into the cache for frequently running queries. Now what happened when old query plan has table scan parameter which is require to change for index scanning after increasing records.

    I found that in my situation query optimizer use old query plan instead of to create a new query plan.The query optimizer was using an old query plan from the query cache. I have created very interesting post on Parameter Sniffing. Please visit this url: http://www.dbrnd.com/2015/05/sql-server-parameter-sniffing/

提交回复
热议问题