So far as I realize, CouchDB indexes are up-to-date whenever a view is queried. Presuming you will find more reads than creates, is not this harmful to scaling? Wouldso would I configure CouchDB to update indexes on creates, or even better, on the schedule?

CouchDB does regenerate sights on update, only on which has transformed because the last read use of the vista. Presuming your read volume greatly exceeds your write volume, this should not be considered a problem.

When you are altering large amounts of documents at the same time this can lead to the potential of the very first read demands going for a noticeable period of time. To ease mtss is a couple of different options happen to be recommended. Most depend on signing up with CouchDB's update notices and triggering reads instantly.

A good example script for doing exactly that's on the CouchDB wiki at [1].


a) "Scaling" is really an overloaded term. What "kind" of scaling are you currently mentioning to? (In either case, I can not observe how it affects you adversely).

b) Update on creates: Just query your view following a write. Observe that adding a lot of data towards the index is much more resource friendly (that does not specific to CouchDB). So you might like to trigger your view every N creates.

c) Scheduled: Setup a cronjob that queries your view every M minutes.

d) Watch for CouchDB to evolve to offer you the infrastructure that enables you to definitely set this track of a configuration parameter.

e) (Smartest Choice). Get a hands dirty and allow us to out sprucing up CouchDB! Any contributions are highly appreciated.

d) RTFM (blink :)

You cannot as well as, why can you want that?

Consider it like this:

  • Whenever you import data into MySQL you are able to turn of indizes since it is more costly to update the index for each row you place, than to update the index for 100 creates (or however many rows you import) in one run.
  • For this reason CouchDB updates the index on read since it is less costly to integrate individuals 100 changes simultaneously, then each change when it is written.

This is among the benefits of CouchDB! :) That does not mean that this can be a CouchDB only feature, but it is just wise to get this done on read.

One factor you could do this is read with update=false, the industry dirty read and can not return that which you expect. Should you always do that, you can plan a "regular" go through a cronjob increase your index with this. I simply don't believe it seems sensible.