October 25, 2002 at 12:58 pm
Hello again fine people,
I'm wondering what is the best way to index a table with a couple million records in it.
The table itself is in bad shape, i figure i will have to create the indexes first, then index it. Anyone have a good idea on how to maybe batch up a process to index a table like this? please keep in mind i'm still a little new to sql server
thanks
Mike
October 25, 2002 at 1:35 pm
Just create scripts and run. You can shortcut the process some by creating copy of the table structure, setting up your indexes using EM, then once you're happy script them out, change the target name, then run in QA. May take a while depending on your hardware, definitely want to run off peak if you can.
Andy
October 27, 2002 at 12:06 pm
Not sure what you mean by "create the indexes and then index it", once you create the index the table is indexed.
If putting more than one index on a table then create the clustered index first, as all other indexes use this.
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 30, 2002 at 4:08 am
What I would like to know is what is the exact process of building an index within SQL server?
At what stage of the index process does the table get locked, for example.
Thomas Rushton
blog: https://thelonedba.wordpress.com
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply