tags:

views:

30

answers:

1
+1  Q: 

Temp View Caching?

I'm using CouchDB with a home-grown C# interface library. The most common method of accessing CouchDB with this library results in a temp view being created. I've optimized the library so that it uses keys when possible. My question is this: are temp views cached by CouchDB? It seems that the first time I run one of these temp views it runs a bit slowly. After that, similar queries that use the same view code seem to execute way faster.

So does CouchDB cache views? And if so, how long to they stay cached? If I'm hitting the database at a fairly constant rate is there much use in switching to static views?

+3  A: 

Temp views are not for production, only for testing. As your database grows they will only get slower. You should figure out what views you need and go from there.

If you really need dynamic queries you should look into couchdb-lucene. While designed for full-text search I've had some success using it for general queries.

dnolen