indexing - Clustered/non-clustered index on unique identifier column in SQL Server -
I have read various questions / answers here, which basically indicate that a compiled index on a unique identifier column There is a bad option to be done because of the performance, I need to use a unique identifier as my primary key, and I do not want to use nervous (because) the values produced are similar to each other. Not (so I need more random user ID [proper] 'estimate' another ID).
So, what is the best way to get this PK index? Although a package indicator is not ideal on this column, is it better than the "unique, non-clustered" index?
I am using SQL Server 2005. First of all, if you are trying to use NEWID () to get randomness (more than just looking at random) p>
, you're in trouble.
This is usually less than the ideal option because other indexed packages will reference the index key and a longer package index will degrade the performance of all indexes. You can create an identifier integer column And can create unique non-clustered unique index on the package index and unique identifier columns.
Comments
Post a Comment