indexes and table data reload

  • If I remember right, all indexes are automatically rebuilt when a table gets truncated and reloaded with new data, correct? Same columns, just fresher data and more of it.

    Just making sure I do not have to add disable and rebuild index script to my job.

    Thanks.

  • Well, I imagine the indexes are emptied, if that's the right word, when the table is truncated.

    An index on 0 rows will not contain much!

    Note having (nonclustered) indexes in place during inserts can slow the import process down, and they'll likely be highly fragmented once the import is complete (and table stats could be well out of whack). Could be best to drop the indexes before the load & recreate once it's done.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply