incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Deibert <mark.deib...@gmail.com>
Subject Re: What's Better 1 Doc With Many Attachments or Many Docs With 1 Attachment
Date Wed, 23 Oct 2013 14:43:03 GMT
@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 <kocolosk@apache.org> 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 <bdrhoa@gmail.com> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message