couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: Documents with many attachments
Date Fri, 04 Dec 2009 03:43:03 GMT
On Thu, Dec 3, 2009 at 5:48 PM, Dave Ray <> wrote:
> Hi there,
> Is there any reason in terms of performance, stability, or good taste,
> that I should avoid adding 100s or 1000s of attachments to a document?
> I have about 3000 pngs on a document and things seem to work fine
> (aside from Futon being a little unusable when I view the doc), but if
> this is going to cause me trouble later I can split it up into
> multiple docs with single attachments without much more work. Just
> wondering.

At a certain point, you could have too many, and that would start to
suck. Since they are all in one doc the metadata for the attachments
has to fit in memory.

Probably the best metric you can have is the size of the JSON stubs
you're schlepping around on the doc. With 100k attachments the JSON
doc would be too big to deal with. Maybe you can handle all the JSON
for 10k attachments -- a doc with one thousand attachments is not that
many kb of JSON.

> Thanks!
> Dave

Chris Anderson

View raw message