Do many design documents bog down Couchdb?

AFAIK CouchDB updates views only when results are first requested (that's why they have a "stale views" option).

Up vote 2 down vote favorite share g+ share fb share tw.

The specific example I read, which mirrored my own use-case, is one where the middle tier creates a new design document for every customer, limiting all queries and the associated generated b-trees to that customer. But doesn't this mean that you'll have, at a best-case scenario (from a business point of view) thousands of design documents? It occurs to me that since every single one of those design documents has to be run for every insert, if only to emit nothing, that would end up being a heck of a strain on the server.

Am I missing something essential about the design of CouchDB that makes this a non-issue? Or is there a smarter way to handle this? Couchdb link|improve this question asked Jan 20 at 20:15Elf Sternberg4,9751723 100% accept rate.

That is an interesting approach to store a design doc for each customer. Do you have somewhere you got the idea? – Ryan Ramage Jan 20 at 20:27 Ryan: Found it: Designing A Modern Web Application – Elf Sternberg Jan 21 at 14:51.

AFAIK CouchDB updates views only when results are first requested (that's why they have a "stale views" option). So, this type of load should not be a problem for you. But you'd better be aware of the disk space consumption if the views output a lot of data.

Ah, I was not aware that a tree was generated only on demand of the view. Thanks. – Elf Sternberg Jan 20 at 21:04.

I probably would not recommend this approach. Lets consider some cases: A new customer You would create a new design doc, and add it to your db. In this case, when the first view requested from that design doc, it will run through all the docs in the db to create the index.

So every new customer will scan all the docs. A new record/or record change Every other document change will be run through all the design doc view functions. Alternative Create a db for each customer.

One design doc in each db. Have a master db for aggregation that all the customer db's replicate to.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions