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 25CC510F9B for ; Wed, 23 Oct 2013 14:43:33 +0000 (UTC) Received: (qmail 58359 invoked by uid 500); 23 Oct 2013 14:43:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 58009 invoked by uid 500); 23 Oct 2013 14:43:29 -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 57842 invoked by uid 99); 23 Oct 2013 14:43:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Oct 2013 14:43:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mark.deibert@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vc0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Oct 2013 14:43:24 +0000 Received: by mail-vc0-f173.google.com with SMTP id if17so560458vcb.4 for ; Wed, 23 Oct 2013 07:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MffZOt0TiFS5rp7lv6PuOVzowERM+ABA9x5y375owuE=; b=Zbzs8/s61W1XitGMC2apEqL/gHlGDeu7i2TgmpsYGEUIF+j7UcgNsV/lxCkBjZhyZ6 NsEhJsvB5M5I6lADdI7rU6jBSTeUqn0TAIPCc5XyjUFkB/OgfaX/+3wyc6qTtEifq2Sx 6qN53V8/QWtkYWhfAy88JWqcIIXNvjxstwrmR1ix/zf6ejXETutl8ASODPusM1xrJe9l DEBJPS18irU3rbtYAl4Y/OqGBpF6XTV47CuUOMMJOniTPfF6ZpZCHdBbd6q1riQsomKJ NZVudaaaiK96vXRx7hZG4BZrSqwxuEqCV2xC4wk6kk0oI/kHokUoaN11N16uBuW2z+ox uHDA== MIME-Version: 1.0 X-Received: by 10.52.171.79 with SMTP id as15mr1167330vdc.1.1382539383735; Wed, 23 Oct 2013 07:43:03 -0700 (PDT) Received: by 10.220.198.199 with HTTP; Wed, 23 Oct 2013 07:43:03 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Oct 2013 10:43:03 -0400 Message-ID: Subject: Re: What's Better 1 Doc With Many Attachments or Many Docs With 1 Attachment From: Mark Deibert To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b6d91d4db0d3c04e9698871 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6d91d4db0d3c04e9698871 Content-Type: text/plain; charset=ISO-8859-1 @Adam This is veeeery good to know. I'm doing this exact same thing. I'm currently using one doc with hundreds of attachments, sorta like the doc is the "folder" holding the files. I've been assuming read authorization to this one "folder" would be simpler. I have a basic authorization solution using a couch list and view. However, I hadn't even considered the replication requirement which will be very important. Thanks for this tip. I think I'll switch up. On Tue, Oct 22, 2013 at 8:38 PM, Adam Kocoloski wrote: > The initial replication of a document with a very large number of > attachments can be expensive -- it's an all-or-nothing affair. After that > when you update a single attachment on the doc the replicator is smart > enough to just transfer that attachment. > > Considering only the replicator's perspective I think you'll have a better > experience by attaching each binary to a separate document. Best, > > Adam > > On Oct 22, 2013, at 3:48 PM, Brad Rhoads wrote: > > > Hi, > > > > From a replication perspective especially, if I have lots, say hundreds, > of > > related (large) attachments, is it better to have 1 doc with many > > attachments, or many docs each with 1 attachment and some field showing > the > > association between docs? > > > > Thanks! > > > > -Brad > > --------------------------- > > www.maf.org/rhoads > > www.ontherhoads.org > > --047d7b6d91d4db0d3c04e9698871--