Faisal Ahmed
Faisal Ahmed

Reputation: 208

SQL Server 2008 non-clustered index

I have a table in SQL Server 2008 with 3 non-clustered indexes. This table gets populated at the end of each month when the month end process is done. During month end process thousands of rows are inserted in this table. Due to the indexes it takes a lot of time to complete the month end process.

So what should I do now? Do I delete the indexes before month end process and recreate them at the end of month end process? Or is there any way to temporarily inactive the indexes before month end and re active the indexes at the end of month end?

Upvotes: 1

Views: 407

Answers (1)

Mitch Wheat
Mitch Wheat

Reputation: 300759

You have two options:

  1. You can script out the relevant non-clustered indexes and then drop them, perform the load and then recreate them

OR

  1. Disable the relevant non-clustered indexes, perform the load and then recreate them with ALTER INDEX REBUILD statements

Upvotes: 4

Related Questions