|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Do I need to Reindex after truncate table?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 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 > 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 > > |
|||||||||||||||||||||||