all groups > sql server replication > november 2004 >
You're in the

sql server replication

group:

GUID's as ID's instead of ID Range Management with replication?


GUID's as ID's instead of ID Range Management with replication? Paul Ibison
11/11/2004 5:09:06 AM
sql server replication:
James,
IMO it is not a good solution. The size is the major
concern - 4 bytes for an integer and 16 for a guid. As
this is most likely the main index on the table, this
means fewer rows per page and more pages and slower
access.
If you use identities and assign large ranges to the
subscribers, this is usually enough to ensure that there
is never any need to get a new range. Alternatively you
can manually assign the range and generate your own
algorithm to ensure you avoid overlapping ranges.
rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com

(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
RE: GUID's as ID's instead of ID Range Management with replication? Jim Breffni
11/11/2004 6:15:07 AM
Identity Ranges are handled automatically for you, so they should not be a
problem.

Be careful about assigning large identity ranges, if you have multiple
subscribers and they are all active then if you have to drop and then renew
your subscriptions for any reason the start of the new ranges will come AFTER
the last highest number used. For very large ranges this means you could run
out of numbers.




[quoted text, click to view]
GUID's as ID's instead of ID Range Management with replication? James Edwards
11/11/2004 12:32:16 PM
Can someone tell me whether using GUID's as identity keys is a good/bad idea
to get around the problem of Identity Ranges for different subscribers (when
using merge replication)?

I am looking at replication for the first time as we are about to start a
project where multiple remote sites will be entering data into shared SQL
databases. It's early days yet and we haven't really even started on
analysis properly, but from what I know about the project so far, it does
appear that the ID will not need to be in a 'readable' format.

Cheers

James E

RE: GUID's as ID's instead of ID Range Management with replication? Brian Reuter
11/12/2004 6:43:05 AM

If you have a managable number of subscribers and you need to display the
record's id to the user then Identity Ranges will work.

I personally perfer GUIDs since the thought of managing identity ranges for
several hundred subscribers scares me. If you don't use identity ranges,
many people use a composite key to ensure the record is unique so you're
likely at 8 bytes anyways...what's another 8 really? Microsoft Business
Solutions uses GUIDs thoughout the entire database in their CRM solution...I
tend to think they know what their products are capable of.




[quoted text, click to view]
Re: GUID's as ID's instead of ID Range Management with replication? Earl
11/14/2004 10:25:08 AM
Interesting thoughts Brian. Take a difference scenario, using PocketPCs,
where bandwidth (even on-board) is more crucial. Now those "extra 8-bits"
really start to add up. Would you still feel the same about GUIDs?

[quoted text, click to view]

Re: GUID's as ID's instead of ID Range Management with replication? James Edwards
11/18/2004 4:52:59 PM
Thank you for all your help....

you have given me more than a little to take into consideration, but all
your comments have been useful...

many thanks

James E

AddThis Social Bookmark Button