Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 10358 invoked from network); 7 Jan 2009 23:08:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jan 2009 23:08:01 -0000 Received: (qmail 63093 invoked by uid 500); 7 Jan 2009 23:08:00 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 62778 invoked by uid 500); 7 Jan 2009 23:07:59 -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 62767 invoked by uid 99); 7 Jan 2009 23:07:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 15:07:59 -0800 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 (athena.apache.org: domain of jwall@google.com designates 216.239.45.13 as permitted sender) Received: from [216.239.45.13] (HELO smtp-out.google.com) (216.239.45.13) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 23:07:52 +0000 Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id n07N7VZR027264 for ; Wed, 7 Jan 2009 15:07:32 -0800 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1231369652; bh=guuiLqIGxRXkoHaIMDGCIyhpK3w=; h=DomainKey-Signature:MIME-Version:In-Reply-To:References:Date: Message-ID:Subject:From:To:Content-Type:X-GMailtapped-By: X-GMailtapped; b=jLgYAA42/YSjBzeZ6M05k4RD25MeZs1CnvzYIINePPQYb1xDQ oDr3l+53X3ay4zcUqEmPqppaZzvm6sqJepAow== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: content-type:x-gmailtapped-by:x-gmailtapped; b=T2rIXCeBjzd6Ed4vo9T4w+2iA3JEZMymIyGd0h+bcluBLYb43GNNeFCOmubnjBXxH LBuBChfz2e28sL1ppWRvA== Received: from bwz6 (bwz6.prod.google.com [10.188.26.6]) by wpaz29.hot.corp.google.com with ESMTP id n07N7RBn019758 for ; Wed, 7 Jan 2009 15:07:28 -0800 Received: by bwz6 with SMTP id 6so22991948bwz.0 for ; Wed, 07 Jan 2009 15:07:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.113.3 with SMTP id y3mr16973065fap.71.1231369646656; Wed, 07 Jan 2009 15:07:26 -0800 (PST) In-Reply-To: <9d5c45d10901071449m23f634c4v4efc6af6b8d8f3c9@mail.gmail.com> References: <9d5c45d10901071449m23f634c4v4efc6af6b8d8f3c9@mail.gmail.com> Date: Wed, 7 Jan 2009 17:07:26 -0600 Message-ID: <7c40ded80901071507h5562b403s10dd7992d8abf48d@mail.gmail.com> Subject: Re: Slooooow views From: Jeremy Wall To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=001636c5c2f1604d80045fec960f X-GMailtapped-By: 172.24.198.93 X-GMailtapped: jwall X-Virus-Checked: Checked by ClamAV on apache.org --001636c5c2f1604d80045fec960f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I'm not sure but from recent discussion on the list I think that reduces happen at query time so complex reduces will slow down queries. Complex Maps should only be an update time hit so those don't figure into a query when the index is updated. Maybe someone else could chime in on when you get the hit for reduction? On Wed, Jan 7, 2009 at 4:49 PM, Chris Van Pelt wrote: > I'm pretty new to couch, and I'm wondering if there is a way to > improve the performance of my views. My views are very slow during > generation, but also during simple queries. > > A request to one of my views after it is fully updated takes 2-4 > seconds. The view is rather complex, using compound keys and an > involved reduce step, but I assumed that didn't matter once the update > step was complete. I have 10000 documents in my DB. > > The update step, after adding 11 documents, takes 23 seconds. > > Because I have a web server talking directly to couch, I can't afford > requests taking longer than a few seconds. Ideally my requests would > be in the tenths of seconds. How do people deal with this in the real > world? I understand I can fire off view generation manually, but than > all other requests hang while the view is being generated. > > I've also been looking for a way to edit my views without taking down > my entire site for the 15 minutes it takes to regenerate the entire > index. It seems plausible to keep the old index around for queries > while the new index is being created, no? > > Chris > --001636c5c2f1604d80045fec960f--