One of Jeff Atwood’s against using a GUID is
Cumbersome to debug (where userid='{BAE7DF4-DDF-3RG-5TY3E3RF456AS10}')
And I agree. I thought, now that the 16-byte identifier is no longer considered a huge undertaking, are the 16-byte + 4-byte IDs a practical compromise?
You can use clustered indexes and do most of your sequential (read: optimization) work with auto-increment identifiers. Combining, distributing, or other large enterprises will use the GUID as their primary workhorse.
So ... is anyone out there trying to mix the best of both worlds? What were the results of your enterprise? Of course, there is a problem when the PC (GUID) feeds on its entire index space next to another indexed field (auto-increment identifier), so I assume that the trade-off may be delicate and / or specific to a very narrow scenario.
Note: this question has addressed the problem before, but in terms of referential integrity management. I'm just wondering how I could combine a combination of PC / UK configurations on the table and their various effects on performance and scale. In fact, is it better to use a GUID as a PC and auto-increment as a non-unique index? Is it better to make them a unique key as a pair?
Thank you for your time.
source share