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
 Transact-SQL (2000)
 Stored Procedure vs. Query

Author  Topic 

cidmi.dovic
Yak Posting Veteran

53 Posts

Posted - 2008-06-11 : 19:16:25
Hi,

I have a Sql query that takes 10 seconds of execution time. When I insert this statement into a Stored Procedure the SAME query takes about 3 minutes to complete.

Any idea?
Thanks.

The Padrón peppers itch and other no

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-11 : 19:39:57
Sounds like parameter sniffing. Could you post it?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

cidmi.dovic
Yak Posting Veteran

53 Posts

Posted - 2008-06-11 : 19:50:55
Yes, It is.
I've asigned the procedural inputs to local variables to solve it.

Thanks.

The Padrón peppers itch and other no
Go to Top of Page
   

- Advertisement -