Bah. sql, query, queries, smallint In the last episode (Dec 30), Rick Faircloth said: > Aaaahhhh, that's how the auto_increment id problem is solved. > > I wonder why they can't do something like Access with its > ReplicationID or whatever it's called...
Access just used a random 32-bit integer, and you risked generating dupes. If you go this route it might be better to create a dual-column primary key, with the first column being the server-id taken from my.cnf (already visible in the @server_id variable), and the other column being a standard AUTO_INCREMENT field (but with each server keeping track of its own max ID). Oracle manages this by handing out "groups" of IDs to each server. The first server to add a record gets IDs 1-49, for eample, and the next server gets 50-99. When a server uses its range up, it asks for another block (which server is in charge of handing out groups I don't know. Maybe the one with the highest uptime?) http://download-west.oracle.com/docs/cd/B10501_01/rac.920/a96598/design.htm#1028013 -- Dan Nelson [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php