incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: In regards to naming of design documents
Date Fri, 13 Nov 2009 08:55:45 GMT
On Thu, Nov 12, 2009 at 01:35:46PM -0700, Chris Stockton wrote:
> > Remember you don't *have* to have separate design docs per table - you can
> > have multiple views within the same design doc, and the user doc will only
> > be serialized once to the view server to build all those views.
> Part of the design (which I left out in the previous mail) is we will
> be dynamically creating views fairly often, placing them into the
> tables design document. I would like to have a single design document
> with all views for a database, as well as the lookup for the tables.
> However from my understanding when we added/updated views for a design
> doc, it would cause the other views under that design document to also
> re-index. I could see on a large database with 100+ tables, having to
> re-index every view for all tables for a single view update could get
> expensive. I would appreciate you to kindly correct me if I am wrong
> as that would perhaps sway our design decisions.

That's correct. On the flip side though: every document is sent once to the
view server for each design document. So if you have 100 design docs then
insert a load of user documents, then each new user document will be
serialised and sent to the view server 100 times, only to be discarded by
the majority of the views.

There are some patches floating around which allow you to do some
pre-filtering on the couchdb side to limit which documents are sent to each
design document's views based on some attribute of the document.

View raw message