Re: sp_spaceused - too much unused space Erland Sommarskog wrote:
>
> Gert-Jan Strik (sorry@toomuchspamalready.nl) writes:
> > If your table does not have a clustered index, you can temporarily add
> > one, just for the purpose of DBCC DBREINDEX, or you can change one of
> > your existing indexes to be the clustered one.
>
> Actually, wouldn't just adding a clustered index and then dropping it
> have the same effect as a DBCC DBREINDEX? <snip>
Yes it would. Of course, DBCC DBREINDEX on a table is less expensive
than adding a clustered index to a heap and then removing it again. The
DBCC DBREINDEX time is the same as the time it takes to add a clustered
index. However, the removal of the clustered index can take quite some
time, even more time than it takes to add the index.
So I agree with you that Brad should consider adding a permanent
clustered index.
Gert-Jan |