Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slow execution of stored procedure

Status
Not open for further replies.

wawalter

Programmer
Aug 2, 2001
125
US
Hello,

I have an sp that runs in less than a second if run from query analyzer, but if the same sp on the same db server with the same parameters is run from a web site or windows app it takes about 5 minutes to run. Other sp's run at the same speed whether called from the web site or windows app or query analyzer.

Does anyone have any ideas on why the same code runs at different speeds depending upon where it is called from?

Thanks,
Bill
 
I tried using different names for the parameters and the variables actually used in the sp, which was one way to deal with that issue if I read it correctly, and it didn't make any difference in the execution speed.

Thanks for the suggestion.
 
A co-worker seems to have found a fix for this problem.

SET ARITHABORT ON

We aren't sure why it fixed it, but it did.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top