couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: Why is the actual size of a database 4 times larger than the netto payload?
Date Wed, 24 Mar 2010 08:36:08 GMT

On 24 Mar 2010, at 01:29, Roessner, Silvester wrote:

> Hi all,
> when I store 1000 copies of a pure JSON document (size 245,310 Bytes) in
> a freshly created database,
> the database itself is 0.9 GB big.
> That is almost 4 times bigger than the actual netto payload.
> Is this normal? 

Yeah, you'll want to run compaction to redice on-disk file size.
See for details.

> When I'll move parts of the document in attachments,
> will I also see this 4 times increase?

It's not the document contents, but the sparse btree structure that 
causes the extra space to be used.

> This message is intended for a particular addressee only and
> may contain business or company secrets. If you have received
> this email in error, please contact the sender and delete the
> message immediately. Any use of this email, including saving,
> publishing, copying, replication or forwarding of the message
> or the contents is not permitted.

When you publish stuff on the web, it's out there.


View raw message