incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filippo Fadda <>
Subject Re: best way to "warm" views offline
Date Fri, 16 Aug 2013 22:57:20 GMT
You can only "warm up" your views querying them. You can use cURL from your command line. This
will cause the creation of an index file per design document. This index file is updated each
time another query is made on a view defined inside the design document. A view is never updated
when you insert a document, but when you query the view itself. For performance reasons you
can choose to avoid the index update when you query a view, but the results will not include
the documents inserted since last query. Anyway you must force this behavior using a query
parameter. The index creation requires time, but the index update is generally fast enough.
So, the best approach is querying all the views when you deploy the application, because indexing
is a slow process. You can do that with a bash script. Eventually, you can query multiple
views at the same time, so you can benefit of a multi-core architecture.


On Aug 16, 2013, at 5:33 PM, Cameron Jacobson wrote:

> What is the best way to "warm" views offline?  Also, if possible, can
> you explain the mechanics that CouchDB uses in order to "know" that a
> given view is or isn't new?  In other words, when deploying an updated
> design document how would the server go about determining whether a
> given view within that design document is different or not?  Is it
> through hashing?  Or do all views within the design document require a
> pre-deployment query?
> None of my datasets have ever really been big enough to required offline
> prepping of views, but I'm anticipating this will change soon so I want
> to make sure I'm using best practices when I'm ready to make this change
> to my deployment process.
> Thanks

View raw message