You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Liran <li...@gmail.com> on 2014/04/23 21:43:21 UTC
Custom reduce is slower then _stats
Hello everyone,
I tried replacing the built-in _stats function with my own Erlang version
that does only the "min" part:
fun(Keys, Values, ReReduce) ->
lists:min(Values)
end.
I expected it to be faster if not the same, but the _stats was finished in
half the time of my custom reduce!
anyone know why?
i wanted to extend it later to return the doc._id with the minimum value
(the _stats just gives you value, but you don't know who is the document
that this value came from)
but if its gonna be so much slower, its useless.
thanks,
Liran