On Jun 30, 2011, at 12:35 AM, Benoit Chesneau wrote: > Other way is to get a bunch of uuids from couch and using them in your > PUT, so you don't have to generate yourself uuids. (and you have best > of both world).
Yes, but it’s much simpler (and faster) to call CFUUIDCreate() rather than write all the code to manage a pool of available IDs, call the server on demand to fetch more, block if necessary until the server replies, handle HTTP errors… On Jun 29, 2011, at 6:08 PM, Dale Harvey wrote: > CouchDB generates uuid's that attempts to minimise the amount of rebalancing > that needs to happen on insert That’s funny — I had noticed yesterday that the doc IDs have long prefixes in common, and felt that this was possibly bad for performance because it slows down string comparisons (more bytes to scan before finding a difference.) But of course that’s trivial compared to the overhead you refer to of fetching more b-tree pages from disk on insert. This must indicate that I come from a hash-table background, not a b-tree one :) —Jens