I have been reading up on the pros and cons of INT vs GUID primary keys and have learned quite a bit I wasn’t aware of regarding the downsides of GUID when it comes to indexing and performance. One thing I saw a few people suggest was to use an INT as the clustered primary key and then a GUID as a nonclustered key in addition to this. The idea is that you would have the performance benefits of using the INT as the primary key, but still maintain the ability for two way data synchronization across servers.
My question is this. It seems to me that if you one were to use GUID as the primary keys, a tool like SQL Data Compare would be extremely powerful as off the top of my head, I feel like data synchronization would be a breeze. However, if the guid was only a secondary key, and INT was still used for primary keys and foreign key reletionships, then I would think that an automated tool like this would not be effective. My assumption is the GUID would only exist on the original record, not on related records, therefore there would be conflicting primary/foreign keys causing confusion to a data comparison tool. Yes, with stored procedures these secondary GUID keys would make it possible to perform two way synchronization, but don’t see it as offering the same level of ease that using the GUID as a primary would.
Anyone have experience with this concept and want to chime in? Maybe I am misinterpreting the way this has been described and someone can steer me in the right direction.