January 13, 2004 at 4:58 am
Hi,
I am familiar with setting and rebuilding indexes in SQL Server 2000, but I have been asked to investigate how to rebuild the data in a database.
We have a table that contains an large amount of data. Several new columns have been added to this table and my boss says I will need to rebuild the data as well as the indexes so that it is stored contiguously instead of being scattered all over the place.
I've had a look through books online and can only come up with references to rebuilding the master database.
Can anyone point me in the right direction?
Thanks for your time.
Regards,
Kevin.
Windows 2008 Server | SQL Server 2008
January 13, 2004 at 3:02 pm
I think if you restore it from a backup it will be contiguous. The question will be, is this feasible.
Chris
January 14, 2004 at 12:19 am
I think the easiest way to rebuild the data would be to delete and add a clustered index. The final result would be data ordered by the clustered index.
January 14, 2004 at 1:50 am
Thanks guys.
Windows 2008 Server | SQL Server 2008
January 14, 2004 at 8:22 am
Also, you can use Bulk Export/Import queries on each table and reload all the data. It's amazing how fast bulk operations are.
Mark
January 14, 2004 at 10:48 am
It sounds like you boss is talking about DBCC INDEXDEFRAG and DBCC DBREINDEX commands. Check them out in the Books OnLine. -SQLBill
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply