February 3, 2016 at 1:13 pm
Hi All,
Today i have heard a strange issue from apps team.
We have store procedure on one of our sql server 2008 server database. When we ran that sp(sp_new)
manually it took only 16 secs to complete and same sp we re-created with different name and run the sp(sp_new_1) ,it took almost 20 mints to complete.
The apps team what why it is taking more time while executing same sp with different name.
any idea please?
February 3, 2016 at 1:41 pm
In short, different parameter values can generate different execution plans.
There is a very good article on that topic: Slow in the Application, Fast in SSMS?
February 3, 2016 at 2:10 pm
bala2 (2/3/2016)
Hi All,Today i have heard a strange issue from apps team.
We have store procedure on one of our sql server 2008 server database. When we ran that sp(sp_new)
manually it took only 16 secs to complete and same sp we re-created with different name and run the sp(sp_new_1) ,it took almost 20 mints to complete.
The apps team what why it is taking more time while executing same sp with different name.
any idea please?
On the same server / database? Are there parameters as Alex suggests? Can you post the two execution plans as .sqlplan attachments?
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
February 3, 2016 at 9:32 pm
Both sps we are running manually thorough ssms on Same server and databases .
February 3, 2016 at 9:46 pm
Please post the actual execution plans for both calls.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 4, 2016 at 12:40 pm
Is the problem reproducable?
Have you checked if any blocking was going on during the second execution?
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply