Hi every body
Updating statistics causes queries to recompile.
first time that i run a query with a parameter,the query optimizer make a plan according to that parameter and the next time it doesnt make another plan for another parameter but it uses the first plan which may be not optimal for that parameter and it causes reduction in performance.(parameter sniffing)
when i run update statistics it takes 30 minutes to compelete.
what happens in this 30 minutes?i mean if i run a query during the updating,it recompiles or the query optimizer use the first plan until it finishes updating then after that it start recompliling?
during this 30 minutes which plan is used??