CouchDB streams rows from the view query results to a couchjs process
(which runs your _list functions) via STDIN, so there's no network
involved.

It seems that you're using a _list function to filter your view
results, right? Be aware that even though you're not sending that data
to the client, the database still has to iterate thru all the view
rows and send them to the _list function, just to get filtered there.
So the amount of time it takes to query your view/list will increase
proportionally with the number rows returned from the view query.

Also, what did you mean when you said "cached"?

Post the problem you're trying to solve and your map/reduce functions.
That should help us figure this out. (^_^)

--Zach

On Fri, May 28, 2010 at 5:00 AM, Aurélien Bénel <[email protected]> wrote:
> Hi everyone,
>
>> function(head, req) {
>>     var row ;
>>     while (row = getRow()) {
>>         if (row.value > 1){
>>       send(row.key + "\n") ;
>>     }
>>   }
>> }
>
> I have used a similar solution for a similar problem. However I got a real 
> performance issue with it.
>
> When I query the list (on the cached view), I get 400 items in 13s.
> I thought it was my list's fault so I tried to query the (cached) view 
> directly and I got 7000 items in 16s.
>
> Any idea of where the bottleneck is? Does the list get the view through the 
> network?
>
>
> Regards,
>
> Aurélien

Reply via email to