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 procedure performance

Author  Topic 

vanbasten
Starting Member

7 Posts

Posted - 2011-12-08 : 19:05:51
I have a stored procedure which runs a query on a view and return result. The stored procedure was taking over 10 seconds to run so I did some optimization on the view. After optimization, running the query on the view would return result instantaneously. However, executing from the procedure which run the exact query (on top on the same view) still takes over 10 seconds. I read something about plan caching and tried recompiling the procedure but it did not help. Any idea? Thanks in advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-08 : 19:19:17
Have you compared the execution plans?

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

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-09 : 00:18:43
something to do with parameter sniffing?

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

Go to Top of Page
   

- Advertisement -