Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 47975 invoked from network); 11 Sep 2008 17:45:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 17:45:45 -0000 Received: (qmail 25606 invoked by uid 500); 11 Sep 2008 17:45:41 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 25573 invoked by uid 500); 11 Sep 2008 17:45:41 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 25562 invoked by uid 99); 11 Sep 2008 17:45:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 10:45:41 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jwall@google.com designates 216.239.33.17 as permitted sender) Received: from [216.239.33.17] (HELO smtp-out.google.com) (216.239.33.17) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 17:44:41 +0000 Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id m8BHinbg027274 for ; Thu, 11 Sep 2008 18:44:50 +0100 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1221155090; bh=Rb+LxDjtoV7AugIl/PIDPEfK2Wk=; h=DomainKey-Signature:Message-ID:Date:From:To:Subject:In-Reply-To: MIME-Version:Content-Type:References; b=vZTURTgsMDegr4D/wwBNva81qV RYX7cByp6T5TAMxBIv2KXpt/QrxuEFfbqxk0ap6W6mQebr8t7/snRlR9V/QA== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=message-id:date:from:to:subject:in-reply-to:mime-version: content-type:references; b=uez2WJ2hG0WvMXok+ajpmb38MnFbiLeRfscYVIUqhCnM2ou3q7TMVzZdf1WBmauuJ NWpqybqJ3EvnftLIcPwUw== Received: from gv-out-0910.google.com (gvei36.prod.google.com [10.16.160.36]) by wpaz17.hot.corp.google.com with ESMTP id m8BHi7EA031275 for ; Thu, 11 Sep 2008 10:44:48 -0700 Received: by gv-out-0910.google.com with SMTP id i36so266840gve.17 for ; Thu, 11 Sep 2008 10:44:48 -0700 (PDT) Received: by 10.187.161.10 with SMTP id n10mr415022fao.43.1221155087908; Thu, 11 Sep 2008 10:44:47 -0700 (PDT) Received: by 10.187.160.11 with HTTP; Thu, 11 Sep 2008 10:44:47 -0700 (PDT) Message-ID: <7c40ded80809111044h694a671cta793be9a161ef575@mail.gmail.com> Date: Thu, 11 Sep 2008 12:44:47 -0500 From: "Jeremy Wall" To: couchdb-user@incubator.apache.org Subject: Re: view access keeps timing out In-Reply-To: <928bdd8e0809111011y7851e58flb60d691b4826e5d5@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_35014_25625560.1221155087922" References: <928bdd8e0809101925q1f5963ccsca8e0425a9b289eb@mail.gmail.com> <928bdd8e0809111011y7851e58flb60d691b4826e5d5@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_35014_25625560.1221155087922 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline are you trying to return all of the documents at once? does it improve if you restrict the results with a count=100 or similar? I can possibly see a scenario where it might time out just trying to server several thousand documents to you at once. CouchDB doesn't exactly stream the documents to you one at a time like a sql database might. On Thu, Sep 11, 2008 at 12:11 PM, william kinney wrote: > thanks for those! I was googling trying to find example reduce functions, > in > vain. > > It seems my view (w/ reduce function removed) is still timing out. > curl: (52) Empty reply from server > > real 85m15.699s > > I'm not sure what's going on. The map function isn't that complicated. Any > ideas on how I could find out what's going on? > > Thanks, > Will > > > On Thu, Sep 11, 2008 at 1:08 AM, Chris Anderson wrote: > > > On Wed, Sep 10, 2008 at 7:25 PM, william kinney > > wrote: > > > reduce function: > > > function(keys, values) { > > > return values; > > > } > > > > > > > The problem is with your reduce function (and the existing > > documentation for reduce, which should make this clear, but doesn't). > > > > Reduce should only be used to emit scalar values. In your case, you > > would be better not to define a reduce function at all, and just query > > the map with startkey and endkey ranges. For example reduce functions, > > see couch_tests.js's reduce test here: > > > > > > > http://svn.apache.org/repos/asf/incubator/couchdb/trunk/share/www/script/couch_tests.js > > > > There are also some examples in various blog posts I've written about > > reduce: > > > > Google search for those posts: http://tinyurl.com/couchdb-reduce > > > > Hope this helps! > > > > Chris > > > > > > > > > > > > > > > > > > > > -- > > Chris Anderson > > http://jchris.mfdz.com > > > ------=_Part_35014_25625560.1221155087922--