couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Why are reads from CouchDB so slow? (1.5MB/s or thereabouts)
Date Fri, 23 Mar 2012 17:28:54 GMT
I've lost count of the number of times I started on 'external attachments'. :)

On 23 March 2012 17:09, Jens Alfke <jens@couchbase.com> wrote:
>
> On Mar 23, 2012, at 9:56 AM, Robert Newson wrote:
>
>> One way to avoid this is to
>> use one file for documents and another for attachments. If TouchDB is
>> effectively doing that, then that explains how you escape the issue.
>
> Yes — TouchDB stores every attachment as a separate file. It’s a very simple content-indexed
store, where the files are named according to their SHA-1 digests. The document metadata*
contains attachment digests. (This then requires that compaction run a mark-sweep phase where
it collects the digests of all available attachments, then deletes attachment files that don’t
appear in that list.)
>
> —Jens
>
> * https://github.com/couchbaselabs/TouchDB-iOS/wiki/Object-Design-And-Schema

Mime
View raw message