Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 25051 invoked from network); 1 Aug 2008 16:28:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Aug 2008 16:28:02 -0000 Received: (qmail 36133 invoked by uid 500); 1 Aug 2008 16:28:01 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 36089 invoked by uid 500); 1 Aug 2008 16:28:01 -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 36078 invoked by uid 99); 1 Aug 2008 16:28:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 09:28:00 -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 demetriusnunes@gmail.com designates 74.125.46.157 as permitted sender) Received: from [74.125.46.157] (HELO yw-out-1718.google.com) (74.125.46.157) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 16:27:05 +0000 Received: by yw-out-1718.google.com with SMTP id 5so581658ywr.0 for ; Fri, 01 Aug 2008 09:27:22 -0700 (PDT) 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=7PTutNKwbEWee0mf+tK3b2k4gN49xKtNes5q76HbyMo=; b=K1rZSauqwhOW5bWbgvxoKdJ+tBOZ07W9G+eQzW0hxnqjAO+nVuCJb8i09Vf8hdkVeF L2/iYnQH/f2+rUErrIBieZwi6m9PVseCdVT76j8WixkVdw3nFfbmggrNpv8StXcd607H +TJHVK+M0kgsmnJpDJ6Jl34kgcp59s6rSHXP4= 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=OUJUiweoVclNjltce8KmiFo2NmnCdwQjcnnaAmA4GTbNd9vgQGfQUd9MjSWd86roSx QC5LzvujqU2VBFgoae7Ft5IhCrxW9eZWjSjU0E7THJpe4DaBlr3fy98wMMX0eWLThRHp 8SM7l1shG1L7Trh9SGJZj9a+w2zuyaJI7KTI4= Received: by 10.142.81.6 with SMTP id e6mr3811065wfb.205.1217608041344; Fri, 01 Aug 2008 09:27:21 -0700 (PDT) Received: by 10.142.193.10 with HTTP; Fri, 1 Aug 2008 09:27:21 -0700 (PDT) Message-ID: <4aa4f4d60808010927l7f4052a7k70c9c7e66493ab0@mail.gmail.com> Date: Fri, 1 Aug 2008 13:27:21 -0300 From: "Demetrius Nunes" To: couchdb-user@incubator.apache.org Subject: Re: Is it possible to evaluate a view on a 20.000 documents database? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4010_4864483.1217608041333" References: <4aa4f4d60807311410m6077d984x83cb3b5d4e8c6f17@mail.gmail.com> <06C596D4-E5D1-4161-BFF1-D3A40FFB4627@gmail.com> <4aa4f4d60807311538h5a9c9d02k2dc507a0b566f34@mail.gmail.com> <20080801160848.GA12647@ginosko.ndrix.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_4010_4864483.1217608041333 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for all the advice. I'll do that and get back to you about how it went. Cheers. On Fri, Aug 1, 2008 at 1:17 PM, Paul Davis wrote: > On Fri, Aug 1, 2008 at 12:08 PM, Michael Hendricks > wrote: > > On Thu, Jul 31, 2008 at 07:38:03PM -0300, Demetrius Nunes wrote: > >> The view I am trying to create is really simple: > >> > >> function(doc) { > >> if > >> > (doc.classe_id.match(/8a8090a20075ffba010075ffbed600028a8090a20075ffba010075ffbf7200c48a8090a20075ffba010075ffbf7200d9/)) > >> emit(doc.id, doc); > >> } > > > > You might try changing your emit() to > > > > emit(doc.id, null); > > > > I seem to recall some discussion on the mailing list that including the > > document in the emitted value (especially for large documents) can > > significantly affect view performance. > > > > Whatever you emit is stored in the view. So if you're emitting an > entire doc, the entire doc is going to be stored twice (Once in the > db, once in the view). Not sure that there's any extra overhead other > than storing the doc. Although, storing the doc is going to require a > second json <-> erlang conversion. Not sure how expensive that really > is, but I seem to remember chatter about the conversion being > noticeable. > > > -- > > Michael > > > -- ____________________________ http://www.demetriusnunes.com ------=_Part_4010_4864483.1217608041333--