Since the "Slooow View" thread yesterday I've upgraded both Erlang and
Couch. I did some benchmarks and found some interesting results. The
benchmarks refer to this view: http://gist.github.com/44497
Benchmark.realtime {db.view("Judgment/aggregate", {:startkey =>
[68,0], :endkey => [68,"Z"]})}
=> 0.899371862411499
Benchmark.realtime {db.view("Judgment/aggregate", {:startkey =>
[68,0], :endkey => [68,"Z"], :group => true})}
=> 1.49064207077026
Benchmark.realtime {db.view("Judgment/aggregate", {:startkey =>
[68,0], :endkey => [68,"Z"], :limit => 50})}
=> 0.868830919265747
Benchmark.realtime {db.view("Judgment/aggregate", {:startkey =>
[68,0], :endkey => [68,"Z"], :group => true, :limit=>50})}
=> 0.551984071731567
First off, these times are about twice as fast as I was seeing
yesterday, awesome! The most interesting aspect of the benchmark was
the group and limit combination creating the fastest response... All
of this leads me to a couple, most likely ignorant questions regarding
what's happening behind the scenes.
1. Are the results of the reduce step stored to disk and pointed to by
the index, or re-computed on every view request?
2. When new documents are added and the index recomputed, is the
reduce step repeated for every document in the database?
I love couch, and I'm really hoping I can bend it into my paradigm. I
can't find any other data store that has more promise.
Cheers,
Chris