Hi!

I am using CouchDB 0.10 with jcouchdb 0.10.0-2 in a Java project. In my CouchDB 
database are ~300.000 documents. I create a view which includes all documents 
of the db and 3 key fields.

I query this view and my result set has ~4400 documents. The view was already 
built and needed about 7 minutes. I measured the time for the same query 
multiple times and get the following performance (ms):

1586
864
601
242
231
319
244
253
302
338
268
246
240
275
253
274
250
...

I need to know what leads to that performance result? I think for the first 
query the B+-tree nodes (including root) has to be cached. 1585 ms for that 
operation is pretty slow! But why does the second and third query need about 
(600-800) ms? After the third query the time is about 250-300 ms. Does CouchDB 
has some optimizations? So couchdb realizes I perform the same query multiple 
times and after the third time it keeps the result set in the cache?

Hope you can help me! Thx a lot.

Reply via email to