Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Index performance
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

United Kingdom
180 Posts

Posted - 10/15/2013 :  07:05:27  Show Profile  Reply with Quote
Hi all,

I have a stored procedure that was taking 4 hours to run. So I used the tuning advisor for some index and stats recommendations. It estimated that the performance improvement would be 90%.

These indexes and stats improved performance drastically, the stored proc only took 7 mins to run.

However it has since gone back to taking 4 hours to run.
If I use the tuning advisor it does not recommend any new indexes on top of the ones I have already used.

So what could be the problem?


Almighty SQL Goddess

38200 Posts

Posted - 10/15/2013 :  08:13:34  Show Profile  Visit tkizer's Homepage  Reply with Quote
It's likely a bad plan or out of date statistics. Check the execution plan to see if it's using the new index(es). Try updating stats, or you could try recompiling it if it got a bad plan. And if this continues to happen, you could add the WITH RECOMPILE option to the stored procedure, provided it's not run very often (like thousands of times per minute) unless you have the CPU overhead.

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 10/16/2013 :  01:44:42  Show Profile  Visit jackv's Homepage  Reply with Quote
One consideration , when adding indexes , is the impact it will have on INSERTS , DELETES and index maintenance.

Jack Vamvas
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000