Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 374 invoked from network); 11 Apr 2009 18:58:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Apr 2009 18:58:43 -0000 Received: (qmail 27839 invoked by uid 500); 11 Apr 2009 18:58:42 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27743 invoked by uid 500); 11 Apr 2009 18:58:41 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 27733 invoked by uid 99); 11 Apr 2009 18:58:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Apr 2009 18:58:41 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kenneth.kalmer@gmail.com designates 209.85.218.170 as permitted sender) Received: from [209.85.218.170] (HELO mail-bw0-f170.google.com) (209.85.218.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Apr 2009 18:58:31 +0000 Received: by bwz18 with SMTP id 18so1852809bwz.11 for ; Sat, 11 Apr 2009 11:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=0Q7LKOjiqBrd2BTvXn2T69BpCybq3Ay0jrDRQJsl+cE=; b=XN+lm9YV4oEU54Ahi4tmdlclIlf+CvKruTJ2jmwerRpmdpNphgZaxDQwionw0tgY9X +Ht/7bMg+Z/jz493jAGQ0PJLsJ28qlHRUB6r6FqK5IlKc4adcCK6Vyy+72i0c/LpYsTp KDY5qcL4IkHoht4kDqd/lr8xxJBaZKP8aaw0o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=PigYdOo32p/IpyID7h+1vqwsIs2AsKVWzXdWPuM3WrJ9COQHWHTHlX4El/lXEPUu3x EQCHBAUwb4mq452L35BMPxUDUa/K/FuR2eJKofQ8FBCYzrDyYaYSaBEdaqzY/AzfGex6 CrMUBPrPuqMx84n1oZXV9kDZCn1dQUHi63Z/E= MIME-Version: 1.0 Received: by 10.204.117.142 with SMTP id r14mr4400350bkq.197.1239476291063; Sat, 11 Apr 2009 11:58:11 -0700 (PDT) In-Reply-To: References: Date: Sat, 11 Apr 2009 20:58:11 +0200 Message-ID: Subject: Re: Some guidance with extremely slow indexing From: Kenneth Kalmer To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e6da98f209511f04674c100d X-Virus-Checked: Checked by ClamAV on apache.org --0016e6da98f209511f04674c100d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, Apr 9, 2009 at 5:17 PM, Paul Davis wrote: > Kenneth, > > I'm pretty sure you're issue is in the reduce steps for the daily and > montly views. The general rule of thumb is that you shouldn't be > returning data that grows faster than log(#keys processed) where as I > believe your data is growing linearly with input. > > This particular limitation is a result of the implementation of > incremental reductions. Basically, each key/pointer pair stores the > re-reduced value for all [re-]reduce values in its children nodes. So > as your reduction moves up the tree the data starts exploding which > kills btree performance not to mention the extra file I/O. > > The basic moral of the story is that if you want reduce views like > this per user you should emit a [user_id, date] pair as the key and > then call your reduce views with group=true. > > HTH, > Paul Davis > Hi Paul Thanks for taking the trouble of investigating for me, I'll dive into the views and clean them up a bit according to your advice as well as brush up on the caveat you explained. I saw other threads in the archives where you gave similar advice, sorry for not realizing I stepped into the same trap. When I've got the issue resolved I'll update the gist and we can leave it as a point of reference for others. Thanks again! -- Kenneth Kalmer kenneth.kalmer@gmail.com http://opensourcery.co.za --0016e6da98f209511f04674c100d--