Each database is a separate file containing all documents and attachments of that database, so there will be two copies. If you attach the same attachment to two different documents in the same databases, it will also be stored twice. CouchDB does not dedupe attachments at all.
B. On 28 October 2011 11:32, Gregor Martynus <[email protected]> wrote: > I wonder how couchDB stores document attachments internally. In particular, > I'd like to know if I replicate a document with attachments from one > database to another, will the attachments be stored twice internally or will > the couchDB be smart enough to understand that the attachment does already > exist and only needs to link to it? > > I hope my question is clear. In my case, each account has an own database > with its own documents. Now documents can be shared between accounts which > will be done using replication. But when attachments would get stored > multiple times although they are exactly the same I fear that it would use > up too much space and eventually slow down replications etc? >
