On 31.05.2010, at 18:55, Aurélien Bénel wrote:

> Good evening,
> 
>> try replacing the reduce function with the single word string "_count" 
>> (Without the quotes)
>> this will do it in Erlang, and should speed things up a lot. please let us 
>> know what kind of difference this makes.
> 
> Wow! Indeed! It went from 13 seconds to 1second!!!
> Maybe I should learn erlang ;)
> 
> Thank you very much for your help.
> 
> Two comments though:
> 
> 1. It took me some time to understand that a noeol file had to be done if we 
> wanted couchapp to work with _sum and _count. Is it documented anywhere?

http://wiki.apache.org/couchdb/Built-In_Reduce_Functions

the string in the hash needs to be w/o newline as documented in the wiki. but 
I'll make that a bit more explicit.

> 2. I'm a bit confused by the impact of views implementation on request time. 
> Isn't couchdb supposed to cache partial reduce results (like it does for map 
> results)?
> 
> 
> Regards,
> 
> Aurélien

Reply via email to