user1254579
user1254579

Reputation: 4009

disable or drop the index in ETL stage load

The T-SQl procedure truncate a stage table and insert data into the stage table.What is the best deign pattern to follow in this ETL stored procedures

disable and enable the index or drop and recreate the index

Upvotes: 0

Views: 930

Answers (1)

Dariusz Bielak
Dariusz Bielak

Reputation: 415

So here is a link to the article on the subject Disable / Drop Index

In my opinion, disable, enable is a better option, purely from maintenance point of view. There is not much a difference between two operations, apart from the fact that disable/enable (rebuild) stores the index metadata. This also means that the changes to the index definition, if any, are kept in one place.

With drop/create you have to make sure that any changes are applied in many places, metadata and all relevant sprocs.

Upvotes: 3

Related Questions