Changing an MSSQL clustered index field from containing "random" GUIDs to sequential GUIDs - how wil
Posted
by Eyvind
on Server Fault
See other posts from Server Fault
or by Eyvind
Published on 2010-04-07T06:51:06Z
Indexed on
2010/04/07
6:53 UTC
Read the original article
Hit count: 456
We have an MSSQL database in which all the primary keys are GUIDs (uniqueidentifiers). The GUIDs are produced on the client (in C#), and we are considering changing the client to generate sequential (comb) GUIDs instead of just using Guid.NewGuid(), to improve db performance.
If we do this, how will this affect installations that already have data with "random" GUIDs as clustered PKs? Can anything be done (short of changing all the PK values) to rebuild the indexes to avoid further fragmentation and bad insert performance?
Please give explicit and detailed answers if you can; I am a C# developer at heart and not all too familiar with all the intricacies of SQL Server.
Thanks!
© Server Fault or respective owner