If you have a table with at most 10 records and it is referenced in lots of other tables( Via FK relationship) with at least 1,000,000 records in each table .
What will you recommend for type of PK( GUID or tinyint ), if replication is never going to be used?
I have bump into this page with followng excerpt:
Guids on SQL Server can perform FASTER than numeric types, once you exceed
about 100,000 rows on modern hardware. This is due to the indexing
optimizations (cascading of the guid blocks) MS has implemented
is that true that GUID will perform faster in my case?
Thanks in advance 😉
INT will be faster – no question. And use less space, too (ok, with 10 rows, it’s not a big difference really).
INT is IMO also a lot easier to use:
is just a whole lot easier to write and memorize than
So I would almost always (in 95%+ of cases) put my vote in for INT rather than GUID.
Also, because GUID’s as clustered key in SQL Server (which the Primary Key defaults to) are horrible for performance (read this GUIDs as Primary Keys and/or the clustering key blog post by “The Queen of Indexing”, Kimberly Tripp for background info on the topic), I would just try to make it a habit to use INT (possibly: INT IDENTITY) as my primary and clustering key whenever possible.
Marc