Home All Groups Group Topic Archive Search About

Do I need to Reindex after truncate table?

Author
28 Nov 2007 6:08 AM
dengcharles
Hi All,

A quick question: Do I have to Reindex a table (using "DBCC DBREINDEX"
statement) AFTER I truncate a table? In SQL 2005 BOL it seems after
truncate table although the index(es) is still there but the data page
is 0.

Thank you for your help.

Bob

Author
28 Nov 2007 6:33 AM
Ben Nevarez
After truncating a table there is nothing to reindex. The index definitions
are still there and will apply to the new records.

Hope this helps,

Ben Nevarez
Senior Database Administrator
AIG SunAmerica



Show quote
"dengchar***@hotmail.com" wrote:

> Hi All,
>
> A quick question: Do I have to Reindex a table (using "DBCC DBREINDEX"
> statement) AFTER I truncate a table? In SQL 2005 BOL it seems after
> truncate table although the index(es) is still there but the data page
> is 0.
>
> Thank you for your help.
>
> Bob
>
Author
28 Nov 2007 7:18 AM
Ben Nevarez
Regarding your statement that "index(es) is still there but the data page is
0" you can use sp_spaceused 'your_table' to verify that everything is 0
(rows, data, index, etc).

Hope this helps,

Ben Nevarez
Senior Database Administrator
AIG SunAmerica



Show quote
"Ben Nevarez" wrote:

>
> After truncating a table there is nothing to reindex. The index definitions
> are still there and will apply to the new records.
>
> Hope this helps,
>
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
>
>
> "dengchar***@hotmail.com" wrote:
>
> > Hi All,
> >
> > A quick question: Do I have to Reindex a table (using "DBCC DBREINDEX"
> > statement) AFTER I truncate a table? In SQL 2005 BOL it seems after
> > truncate table although the index(es) is still there but the data page
> > is 0.
> >
> > Thank you for your help.
> >
> > Bob
> >

AddThis Social Bookmark Button