Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 60491 invoked from network); 29 Jun 2010 18:02:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jun 2010 18:02:21 -0000 Received: (qmail 47767 invoked by uid 500); 29 Jun 2010 18:02:20 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 47715 invoked by uid 500); 29 Jun 2010 18:02:19 -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 47707 invoked by uid 99); 29 Jun 2010 18:02:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 18:02:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [68.142.207.74] (HELO web31811.mail.mud.yahoo.com) (68.142.207.74) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 29 Jun 2010 18:02:10 +0000 Received: (qmail 93098 invoked by uid 60001); 29 Jun 2010 18:01:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1277834501; bh=x/YAV8Gz8QPWldKlma/MGM1OxXp6QDjx4ARyw6u3Ssk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=DzW/DRmiZcW8iqI6AhL1TE55HK3hhrbsyVyUPja0z/rPHDw8cJ621bYvyIYahPG2zWUpGOvzLJRt8nccrysV2lNT4pQzfLKYZjLpAODnj4EsYWiKeuSHpcf0/FKHAVM3b13lAdLR46SiGUqvW8KQugjuHtknoUIywJCfi4YRI+Y= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=Tcmrfoiw/hSME3vEafAMiCvNIgWkkx0h9JsJBzffEMo0OcqVByvdyBYDqcfCTxl7S9Wf+sgZrVjC8V0G3uiLQ6am4fHC8GoxXgJUE+DCWovGbVvLXDoVXsoEXWDZYe2PPxJKTGN2oex+wXJyZnehuDq0mpUxFVyozwZNY0x/C8g=; Message-ID: <681672.80586.qm@web31811.mail.mud.yahoo.com> X-YMail-OSG: bVAgIDkVM1kxBzFDyKIN_IrjxR5OCj8JqeWmxBY0KhaS8XH 6niRmybDEdTdXyfVuMdjSigbtOZ2etL3ajIWe.zIludBftDfDwf0tiFJhGZf jxLZ.hW_cp2zRSNMSA2peTzRBF0EXJ52RozEN9MkCftYfUGjo1cEibrqWbmT RRWyVNnvGgipAM7oVKsTa7fcPlfyF9jPNrqO_fsbKRlHE5AOYryHVwRm3IPu yefQdji63N.nGYgvCSWFxCSl.vwPMpBiMtgU0YlTXb6t4xxuuRgvGEDvKjc2 jbxn2l_JTvIDkn0fCpP.ELZJdJmkPIYuO1tFGW5rFL633mZWfcCbRUziw Received: from [79.127.126.122] by web31811.mail.mud.yahoo.com via HTTP; Tue, 29 Jun 2010 11:01:40 PDT X-Mailer: YahooMailRC/420.4 YahooMailWebService/0.8.104.276605 Date: Tue, 29 Jun 2010 11:01:40 -0700 (PDT) From: Behrad Zari Subject: Re: View Efficency To: user@couchdb.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-93380629-1277834500=:80586" X-Virus-Checked: Checked by ClamAV on apache.org --0-93380629-1277834500=:80586 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > However, I think the original question from=0A> Behrad still stands, is i= t more efficient to emit multiple keys per=0A> document, or create multiple= views?=0A=0AMy own analysis was: when emting multiple keys per document, w= e have more index =0Akeys, i.e. a bigger tree. Call it M*N indexes where M = is number of emits per =0Adocument and N is number of docs emitted! Since q= uerying a B+ tree is logaritmic =0Ato the number of indexes, we MAY compare= Log(N) with Log(M*N) with base of tree =0Ablock sizes! and Since M is not = that big in real applications, I don't think =0Aemiting multiple keys per d= oc will give much more poor performance in quering =0Athe view in comparisi= on to one emit per document. Take that In the later =0Ascenario we may want= to call multiple views and merge the results!=0A=0AAnother unclarified thi= ng for me is the situation where we emit array keys (i.e. =0A[key1, key2,..= .] ). I don't know about how that affects query time. Is the couch =0Abehav= ior like single value keys?=0A=0AI don't know about CouchDB implementation = specifics such as determining block =0Asize,... So I'd like CouchDB men can= clarify these situations.=0A=0A--Behrad=0A=0A=0A --0-93380629-1277834500=:80586--