Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Plan getting changed

Author  Topic 

shaggy
Posting Yak Master

248 Posts

Posted - 2012-02-28 : 03:51:27
I have one SP when am execting this SP the plan is different from the same query which am getting executed from outside (adhoc).total resource consumption is drastically low when it is executed as adhoc.

I could not able to figure out the difference can anyone put some light on this.

Thanks.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-28 : 12:32:47
is it parameterised SP? if yes, this might be a reason


http://www.simple-talk.com/sql/t-sql-programming/parameter-sniffing/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -