incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: View Performance (was Re: The 1.0 Thread)
Date Mon, 06 Jul 2009 07:46:42 GMT
On Sun, Jul 05, 2009 at 11:52:09AM -0700, Scott Shumaker wrote:
> Every document in our database is in a view.  We have a wide variety
> of different documents - but none of them constitute the majority of
> the docs in our database.  In a single design doc, we can't use view
> filtering - which means our performance is far worse (not to mention
> that we have nearly 100 views, so every view request will have to run
> through 100 javascript functions - some of which are quite expensive -
> and are used for offline (batch) processing only).

I think the point is: if you put all your views into a single design doc,
the view-build performance should be *better*. This is because each document
gets serialised and sent to the view server once per design document.

So as long as every document ends up in at least one view, you will minimise
the amount of transfers from Erlang to JS by putting all the views in one
design document. View filtering isn't useful then, assuming each doc needs
to be present in at least one view.

The only caveats I can think of:

- do you have a large number of documents which don't appear in *any* view
  at all? (Apart from _all_docs, of course). If so, you can filter those
  out using the view filter patch as before.

- I haven't checked what happens when you modify one view within a design
  doc: does it rebuild all views, or just that one?

Regards,

Brian.

Mime
View raw message