October 3, 2007 at 7:36 am
Hi all,
I have nightly process that does the following:
1 - Truncates 2 tables
2 - Builds a journal table (approx 4,000,000 rows)
3 - Builds an encumberance table (approx 1,100,000 rows)
Each table has a clustered index on the date. My question is do I need to rebuild the indexes on each table as the final step?? Performance is my main concern with this particular process as these two tables are heavily reported on.
Thanks in advance for your thoughts.
October 3, 2007 at 8:01 am
Rebuilding indexes is something you need to do after big changes in data. Since you truncate first and then load, you should be OK.
You might drop all nonclustered indexes for the tables and add them back afterwards and see if the load/creation goes quicker. Also be sure you are checking heavily used queries to be sure they're hitting indexes.
October 3, 2007 at 8:13 am
Also - you might care to look at whether you need to force certain heavily used SP's to recompile - the new statistics might dictate another plan is more appropriate. If the data distribution changed a LOT since the execution plan was built, having a fancy new index even if perfectly up to date might not help you.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply