Thursday, December 14, 2017

ETL - Index Maintenance - specific table

First off, this script is still a work in progress.  It is something that I created while working with data warehouse indexes, and added to it when I was getting ready for my presentation.  It helps me specifically in the ETL process - I do NOT use this for overall index maintenance.

What is nice about this script is that I am able to either disable or rebuild by using the same stored procedure.  That way, when I want to update the process, I only have 1 place to change it and all SSIS packages that use it will be affected.

The process I am using it in is as follows:

  1. Disable Clustered Index (this also disables all non clustered indexes and saves me from having to specifically do them manually)
  2. Rebuild the Clustered Index
  3. Data Manipulation (insert, edit, delete, etc)
  4. Rebuild all of the NonClustered Indexes

I am working on a full indexing strategy for the entire ETL process, but for now, I have specific needs and this takes care of all the problem children (tables) allowing the ETL process to continue largely unaffected, but these specific uses run much faster than without it.

By accessing or using this code, you agree to be bound by the following: license

Click here for the SCRIPT

If you have feedback, or are interested in contributing, please email: This email address is being protected from spambots. You need JavaScript enabled to view it.

 

Archives

Powered by mod LCA