Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Should I rebuild ETL table clustered index after daily large delete then large insert?

$
0
0

Hello,

We're using SQL 2008 R2 SP1, Enterprise Edition 64-bit.  I've seen many variations of this question, but never this same question, could sure use some help.

Every day, our ETL system deletes a large number of rows from a staging table and then loads that table with the new day's data just pulled that morning.  (In some cases, we truncate the ETL table; in most cases, we use a delete statement.)  The staging table has a clustered index.  I've disabled the non-clustered indexes before the delete and following insert and then rebuild the non-clustered indexes when that's done. 

But what of the clustered index?  Does deleting between 30% and 100% of the rows and then loading the table again necessarily cause extensive clustered index fragmentation?  Better stated: should I rebuild my ETL table clustered index every day after large delete and then large insert operations?

I'm not clear on the concept of "reclaiming space," so I guess that's part of my question, too.  Is a clustered index create the only way to reclaim space emptied by a delete statement?  Should I even be concerned about reclaiming space in this situation?

Thanks,
Eric


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>