Basically what the title says: What are the differences in performance (if any) between using a clustered index on a GUID column vs a clustered index on an INT column, especially when those columns are part of your join predicates?
Edit: To clarify, I was always under the assumption GUIDs typically perform worse than INTs when used in join predicates. I understand a GUID is 4x the data size of an INT, but I was asking my question to really understand why and what's going on "under the hood" that causes GUIDs to perform worse, even after the indexes are rebuilt and there's minimal fragmentation differences between the two types.
VARCHAR(4)
using a binary collation, or even aBINARY(4)
would be slower than comparing anINT
. Maybe I should test it ;-)