[ 
https://issues.apache.org/jira/browse/COUCHDB-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745429#action_12745429
 ] 

Robert Newson commented on COUCHDB-465:
---------------------------------------

Bob,

I read your gist and the pre-compact size for sequential is smaller than for 
random (43,144,791 vs 52,517,614) and post-compaction was smaller for 
sequential too (2,023,522 vs 2,506,850). Perhaps you read the numbers the wrong 
way around? Or did I? :)

I also note that most of this compaction is from not batching as you'll have a 
4k footer block for each write. With ?batch=ok and sequential (and no 
deletions) I find compaction to be only a marginal reduction of space.

> Produce sequential, but unique, document id's
> ---------------------------------------------
>
>                 Key: COUCHDB-465
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-465
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Robert Newson
>         Attachments: couch_uuids.patch, uuid_generator.patch
>
>
> Currently, if the client does not specify an id (POST'ing a single document 
> or using _bulk_docs) a random 16 byte value is created. This kind of key is 
> particularly brutal on b+tree updates and the append-only nature of couchdb 
> files.
> Attached is a patch to change this to a two-part identifier. The first part 
> is a random 12 byte value and the remainder is a counter. The random prefix 
> is rerandomized when the counter reaches its maximum. The rollover in the 
> patch is at 16 million but can obviously be changed. The upshot is that the 
> b+tree is updated in a better fashion, which should lead to performance 
> benefits.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to