When is shrinking a data file acceptable?

  • TheSQLGuru (1/24/2013)


    Ninja's_RGR'us (6/17/2011)


    Dan.Humphries (6/17/2011)


    You know I don't know that I really gave it much thought. My mind just said that made sense and I went with it. But now that I have read some of the replies I think I need to look into why it is taking so much longer.

    My first instinct still stands. Heaps can have pages ALL OVER the place and cause this. I forgot who posted this but he had a table with a few 100 rows that had 15 GB space used (no blobs). Created clustered index and fixed the problem.

    I too have seen multi-GB heap tables with a single row. :w00t:

    I was the one with a table with a few 100 rows that had 15 GB space used.

    Just want to mention that you now have the option of doing a rebuild on a heap table without creating a clustered index:

    alter table [MyTable] rebuild partition = all

    A clustered index would still be better, but at least it is another option to deal with it.

Viewing post 31 (of 30 total)

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