Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 10926 invoked from network); 21 Dec 2008 04:25:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Dec 2008 04:25:15 -0000 Received: (qmail 42709 invoked by uid 500); 21 Dec 2008 04:25:14 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 42678 invoked by uid 500); 21 Dec 2008 04:25:14 -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 42667 invoked by uid 99); 21 Dec 2008 04:25:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Dec 2008 20:25:14 -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 (nike.apache.org: domain of webjogger@gmail.com designates 72.14.252.156 as permitted sender) Received: from [72.14.252.156] (HELO po-out-1718.google.com) (72.14.252.156) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Dec 2008 04:25:06 +0000 Received: by po-out-1718.google.com with SMTP id y22so2791486pof.2 for ; Sat, 20 Dec 2008 20:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=mpmDi1e6lPUHe8bmxfC29fqfAVfyDsQn3LBT+VBD8cM=; b=ieiZ+VPFkie1Lj/Ge0fJnusd3jwoDTmjGc7v1/G0wq+mVUed1qGm74oRK4zWlBDo9o a7SJ+Srv7dXRakR7+PUT0qwj897nBsEzuB5skHnRlsarG0SriPrGUCrQ9Fsem4j/No1B efGV0aEnuiLaB5C/JfpOhpayGdpSy8n1AufBM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=jo7Drov/5VEAx2GnyfQc4xPCEfJLutxbB5R0AkrMznc0eQv+MuFCPga9ehgCbvwJB6 IZHHogomDU6cq7OhvtBryQ9lu1GV/w1BMTnaWQWP1JgoiDixDXa+VFiX41tDmbS0dAe5 PIQkFEFwYjFylrVfpDQQjMVNRykKri+5aOrmI= Received: by 10.141.51.10 with SMTP id d10mr2468217rvk.195.1229833484578; Sat, 20 Dec 2008 20:24:44 -0800 (PST) Received: by 10.141.153.4 with HTTP; Sat, 20 Dec 2008 20:24:44 -0800 (PST) Message-ID: <4c69d7170812202024o53f220f9g155d5bf3cad80e73@mail.gmail.com> Date: Sat, 20 Dec 2008 20:24:44 -0800 From: "paul jobs" To: user@couchdb.apache.org Subject: Re: slow views In-Reply-To: <4c69d7170812202020y7054733at9d9c51465412ca44@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_53736_21320389.1229833484559" References: <4c69d7170812202004v5d3738b4x667201b0181e451f@mail.gmail.com> <4c69d7170812202020y7054733at9d9c51465412ca44@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_53736_21320389.1229833484559 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Key Value *null*38822*""*263251*"female"*615820*"male"*538011 Same applies for this view too, these are the number of users in our app and their sex map: function(doc) { emit(doc.sex, 1) } reduce: function(keys, values) { return sum(values)} On 12/20/08, paul jobs wrote: > > it is a permanent viewbut every repeat request takes time as new users are > constantly added to the db > > On Sat, Dec 20, 2008 at 8:16 PM, Paul Davis wrote: > >> If it's a temp view, no. >> >> If it's a permanent view, no. But *repeated* requests should be nearly >> instantaneous. >> >> That is all. >> >> On Sat, Dec 20, 2008 at 11:04 PM, paul jobs wrote: >> > map: >> > function(doc) { emit(doc.zodiac, 1) } >> > reduce: >> > function(keys, values) { return sum(values)} >> > >> > >> > Key >> > Value *null*149877*"aquarius"*98747*"aries"*103072*"cancer"*104318* >> > "capricorn"*97605*"gemini"*103708*"leo"*107982*"libra"*104955*"pisces"* >> > 101741*"sagittarius"*92975 >> > >> > total number of records ~2 million >> > >> > this query takes quite some time to run >> > is there any way to make this query run faster >> > >> > thanks >> > >> > > ------=_Part_53736_21320389.1229833484559--