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
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/