Sample Header Ad - 728x90

Indexing a PK GUID in SQL Server 2012

14 votes
3 answers
14887 views
My developers have setup their application to use GUID's as PK for pretty much all of their tables and by default SQL Server has setup the clustered index on these PK's. The system is relatively young and our biggest tables are just over a million rows, but we're taking a look at our indexing and want to be able to scale quickly as it may be needed in the near future. So, my first inclination was to move the clustered index to the created field which is a bigint representation of a DateTime. However, the only way I can make the CX unique would be to include the GUID column in this CX but order by created first. Would this make the clustering key too wide and would it boost performance for writes? Reads are important too, but writes are probably a bigger concern at this point.
Asked by njkroes (655 rep)
Oct 31, 2013, 04:27 PM
Last activity: Aug 21, 2020, 03:20 AM