couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guilherme>
Subject Re: Possible to measure disk space of documents in a view?
Date Wed, 03 Sep 2014 19:51:39 GMT
Hi Bill,

Maybe by finding some reliable / good-enough way to calculate an
arbitrary document's disk size and emitting such value in the map
function (among whatever else is already being emitted.) And then
calculating that specific sum on reduce. Not sure about attachments though.

In any case, you'd also have to account for the append-only way of
things, which will incur a overhead of up to whatever the compaction
threshold is (my databases and views usually grow to around twice their
real size before they're compacted.)


On 03-09-2014 20:40, Bill Foshay wrote:
> Is there a way to measure the amount of disk space used by the documents 
> returned by a particular view? As an example, let's say all documents in my 
> database are tagged with a userId and I have a view that returns all 
> documents by userId. Now I want to measure the amount of space used by 
> userId=100? Is this possible?
> Thanks,
> Bill

PGP: 0x35CB8191 / 1968 5252 3901 B40F ED8A  D67A 9330 79B1 35CB 8191

View raw message