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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 stored proc runs slower than direct sql query

Author  Topic 

aggiekevin
Starting Member

14 Posts

Posted - 2007-09-21 : 16:23:15
I was running a sql query pretty regularly and so I decided to compile it in a stored proc. The query itself runs very quickly. However, after creating a stored proc it now runs very slow. I did not change the query at all, I simply put it inside a stored proc. Can anyone tell me why it has slowed down?

Thanks!

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-21 : 17:01:44
can you show us the query?
you probably have a problem with parameter sniffing.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -