Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 49125 invoked from network); 22 Feb 2010 12:24:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Feb 2010 12:24:51 -0000 Received: (qmail 29976 invoked by uid 500); 22 Feb 2010 12:24:49 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 29920 invoked by uid 500); 22 Feb 2010 12:24:49 -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 29910 invoked by uid 99); 22 Feb 2010 12:24:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2010 12:24:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebastiancohnen@googlemail.com designates 209.85.220.209 as permitted sender) Received: from [209.85.220.209] (HELO mail-fx0-f209.google.com) (209.85.220.209) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2010 12:24:39 +0000 Received: by fxm1 with SMTP id 1so2968825fxm.35 for ; Mon, 22 Feb 2010 04:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:content-transfer-encoding :message-id:references:to:x-mailer; bh=VKkIQO2DI9f1wNL1rUtz67c1NwzSsS5+fcxYr4/ERNY=; b=RQh80bWKensNJeyKtkuQNA3TuiDrTEmGSp+O9a2Pi+q+0rvvGqDg/6qOVsCBYZPr3v Pa4ja+MQKF9/8QshPx7wz/oICEbbiLKJSUWO7dkuYVt7ab1w+vl4QHHjez26aSc7oTRk Z/NATvs+w/V//sbpEJT8KrExOEk2Y3iH0owCY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=nmExLxiuZsFKUquVV+9O1pY11bzBHvNiigJlRZGqR479G/YMcXcrVAkhBAhWBsAIaU ChGnFCRjMupeGPB7tVL0SWEDtwyQJiozxkgqqfSpmLwhyQiRHSIwIVoW3Cv73stmSYI0 dXSNy5qg0eXZmXTTsSTqcLAgYMDAdkAd0Ufis= Received: by 10.102.200.17 with SMTP id x17mr10733437muf.125.1266841452229; Mon, 22 Feb 2010 04:24:12 -0800 (PST) Received: from ?192.168.178.21? (koln-5d8193ea.pool.mediaWays.net [93.129.147.234]) by mx.google.com with ESMTPS id i5sm15079619mue.12.2010.02.22.04.24.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 22 Feb 2010 04:24:11 -0800 (PST) Subject: Re: key entropy and view performance Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Sebastian Cohnen In-Reply-To: <2fd53c3a1002220300s293ee858r9400dfa4b07f9b3a@mail.gmail.com> Date: Mon, 22 Feb 2010 13:24:10 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <2fd53c3a1002220300s293ee858r9400dfa4b07f9b3a@mail.gmail.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1077) X-Virus-Checked: Checked by ClamAV on apache.org Hi Fabio, this sounds "normal" to me, since couch views use btrees and (high) = entropy hurts btree's update/insert performance. greets tisba On 22.02.2010, at 12:00, Fabio Forno wrote: > Hi, > during view generation I've noticed that view re-indexing speed seems > very related to the entropy of keys. For example I've map/reduce view > which counts the a set of resources with a score and a type. The score > has a very high entropy (few tens of resources for each score), while > the resource type is limited (>100k per type). If I emit keys as > [type, score] map/reduce computation seems much slower than [score, > type]. Is it normal or a just a case? Isn't there the risk of > degeneration if the numbers of resources grows too much (eg. millions > per resource type)? > Since I need to do range queries according the score, but only on > selected types of resources, I think that the [type, score] key is > preferable, however this degradation in speed concerns me. Any hint? > thanks in advance. >=20 > --=20 > Fabio Forno, > Bluendo srl http://www.bluendo.com > jabber id: ff@jabber.bluendo.com