1
votes

Looking at this post:

[What are the best practices for using a GUID as a primary key, specifically regarding performance?

I understand that if I want to use a GUID as the primary key then this should be non-clustered pk and then also create a clustered int unique index (autoinc).

I just want to confirm that with the setup above all joins would still work as usual ie. tables relate on the GUID primary key field? Also, it would appear that the int unique index field would have no relevance in my application and I would just ignore this completely in any queries/inserts/updates?

1

1 Answers

2
votes

There is no point in creating a clustered index on a monotonically increasing numeric field in your table unless you're planning on using that field to access the data.

I suggest you read this post on DBA.SE for a good discussion of clustered and non-clustered primary keys.