Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2BEB09B46 for ; Fri, 23 Mar 2012 17:09:56 +0000 (UTC) Received: (qmail 76665 invoked by uid 500); 23 Mar 2012 17:09:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 76620 invoked by uid 500); 23 Mar 2012 17:09:54 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 76609 invoked by uid 99); 23 Mar 2012 17:09:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 17:09:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jens@couchbase.com designates 206.225.164.28 as permitted sender) Received: from [206.225.164.28] (HELO EXHUB020-1.exch020.serverdata.net) (206.225.164.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 17:09:47 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.234]) by EXHUB020-1.exch020.serverdata.net ([206.225.164.28]) with mapi; Fri, 23 Mar 2012 10:09:08 -0700 From: Jens Alfke To: "user@couchdb.apache.org" Date: Fri, 23 Mar 2012 10:09:06 -0700 Subject: Re: Why are reads from CouchDB so slow? (1.5MB/s or thereabouts) Thread-Topic: Why are reads from CouchDB so slow? (1.5MB/s or thereabouts) Thread-Index: Ac0JF6hBfQbVDDh4SqqxNwFL1D/Gig== Message-ID: References: <4F6C77E6.40709@gmail.com> <4F6C7C0B.8010801@gmail.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org 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 =97 TouchDB stores every attachment as a separate file. It=92s a very s= imple content-indexed store, where the files are named according to their S= HA-1 digests. The document metadata* contains attachment digests. (This the= n requires that compaction run a mark-sweep phase where it collects the dig= ests of all available attachments, then deletes attachment files that don= =92t appear in that list.) =97Jens * https://github.com/couchbaselabs/TouchDB-iOS/wiki/Object-Design-And-Schem= a