RSS
 

Disable / Enable Index

24 Jul

Indexes are useful when reading data. But when inserting data into a table, it may be useful to disable the indexes and rebuild them again after insert operation completed.

Especially when loading huge data manually or with ETL, disable index on pre-sql and rebuild on post-sql:

----Diable Index
ALTER INDEX [IX_Index_Name] ON dbo.TABLE_NAME DISABLE
----Enable Index
ALTER INDEX [IX_Index_Name] ON dbo.TABLE_NAME REBUILD
Social Share Toolbar
 

Tags: , , , , , ,

Leave a Reply