A typical ETL cycle goes as follows: Extract - Maintenance (Backup / Archive / Stage) - Transform - Maintenance (Backup / Archive / Stage) - Load - Maintenace (Backup / Archive / Stage). Prior to the load phase, for eg. if the indexes are disabled instead of dropping then there are two advantages:
1) By disabling the indexes prior to the load, you avoid all the overhead required to maintain the indexes.
2) By using the disable/enable method, you do not have to maintain scripts to recreate the indexes following the data load.
An index can be disabled by using the ALTER INDEX statement as follows:ALTER INDEX { index_name ALL } ON objectname
DISABLE [ ; ]
To enable an index, it must be rebuilt to regenerate and populate the B-tree structure. You can accomplish this by using the following command:
ALTER INDEX { index_name ALL } ON objectname
REBUILD [ ; ]
No comments:
Post a Comment