We help IT Professionals succeed at work.

Adding a clustered index to a 100 million record table

516 Views
Last Modified: 2012-05-11
SQL2005    I have a 25 gig ,100 million record table in my database without a clustered index. It has a index on the primary key that I want to change to a clustered index.

Is this something I can do while I am online? Is there any pitfalls you guys can warn me about?  
Comment
Watch Question

Developer
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Alpesh PatelSolution Architect at TCS (SAFe®Agilist, TOGAF® Foundation, PSM I®, MCP, MCSD)
CERTIFIED EXPERT

Commented:
Table has only one cluster index. So you can create more than one non-cluster indexes.

Author

Commented:
Sarabhai.... Why at this stage should i just stick with a non-clustered?

PatelAlpesh... Yes I know you can only have one clustered indexes. While I am not a DBA I have creted 100s, maybe thousands of indexes.
Chris MangusDatabase Administrator
CERTIFIED EXPERT

Commented:
Because the clustered index is going to physically rearrange the data on disk this is going to take quite some time if your hardware isn't extremely robust.

I would only do this offline.
sarabhaiDeveloper
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.