Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 135FCD561 for ; Wed, 11 Jul 2012 10:32:03 +0000 (UTC) Received: (qmail 10150 invoked by uid 500); 11 Jul 2012 10:32:01 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 10027 invoked by uid 500); 11 Jul 2012 10:32:01 -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 10008 invoked by uid 99); 11 Jul 2012 10:32:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 10:32:00 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.82.54] (HELO mail-wg0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 10:31:52 +0000 Received: by wgbfg15 with SMTP id fg15so748670wgb.23 for ; Wed, 11 Jul 2012 03:31:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:message-id:subject:x-mailer:mime-version:content-type :x-gm-message-state; bh=nS964dn8OuWdIV1lxE5xuAoMMk9hFOvtahqc0K5O/zc=; b=ZH1WUKpiIfEx7SEswh+EwGONoX3x7AYKGi4EhIptpIeXPaQYs7kTeUVh6csNorfvem Bec1qyOoELugTac21LbMYVyUriqP+j8yT4wJ4DSmHtoc7AEVjDX2/ZfiFh0bSJX9Lox8 Uq2oqGM8eC6w2Q2vGeANVLIxPyAOQ/X8GIj647Bk9/Vm36gVuLy1el12EMSVGnVm4nIc bfm/YggG23zlhoSvdZBcEekdxTcK6cgreF5cC8H46CuMY/zYSMoa2HPDrJedGn+0qRpd clb3vw2wwLWbRDkqJ2iZ+QvCqkCg9HIYov7qbEox332CtVfPXWWd9voMe/MoVX0aXZ3/ bSdw== Received: by 10.180.88.102 with SMTP id bf6mr40996311wib.4.1342002690704; Wed, 11 Jul 2012 03:31:30 -0700 (PDT) Received: from [10.10.10.57] (office.chillibean.net. [193.203.81.66]) by mx.google.com with ESMTPS id y2sm33744927wix.7.2012.07.11.03.31.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 03:31:29 -0700 (PDT) Date: Wed, 11 Jul 2012 11:31:27 +0100 From: Rory Franklin To: user@couchdb.apache.org Message-ID: Subject: Large key's in views X-Mailer: sparrow 1.6.1 (build 1081.52) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="4ffd55ff_5c482a97_4acd" X-Gm-Message-State: ALoCoQl9aO9NCFg75QV/ZG6k2Mm0B5COmYckIv0m41YQ1mw9SSBKPRv8QFhc1UPvGmNaLdVzHLQj X-Virus-Checked: Checked by ClamAV on apache.org --4ffd55ff_5c482a97_4acd Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline We have a tree structure stored in Couch to mimic a filesystem, and I am = trying to determine the most efficient way to calculate storage amounts f= or any node (and below). As each leaf contains its path up to the root node, would it be bad form = to emit out the path with a value of the sum of the contained files withi= n that node, considering that node depth could be huge=3F (although in re= ality would rarely go more than 20 levels deep, more often would be less = than 10 levels) So it could look like this: emit(=5B=226a1b6034bc634e3cf6865da4780c39eb=22, =22d70c3dc615aaa3065e2edd= 4ecd9af74b=22, =226a1b6034bc634e3cf6865da4780c50ad=22 =E2=80=A6=5D, 50030= 203) =46rom there I can do a startkey/endkey query to get all nodes below a ce= rtain point and do a reduce to get the total file size. My worry is that they emitted key being very large could be problematic, = but I guess this would only impact on how much storage the view will use = on disk=3F Rory --4ffd55ff_5c482a97_4acd--