Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4264996C6 for ; Tue, 10 Jul 2012 13:29:16 +0000 (UTC) Received: (qmail 32965 invoked by uid 500); 10 Jul 2012 13:29:15 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 32849 invoked by uid 500); 10 Jul 2012 13:29:15 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 32839 invoked by uid 99); 10 Jul 2012 13:29:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2012 13:29:15 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [80.244.253.218] (HELO mail.traeumt.net) (80.244.253.218) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2012 13:29:07 +0000 Received: from rose.local (p5797ABE4.dip.t-dialin.net [87.151.171.228]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.traeumt.net (Postfix) with ESMTPSA id EBC771438B for ; Tue, 10 Jul 2012 15:31:23 +0200 (CEST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1482\)) Subject: Re: Skip & Limit efficiency From: Jan Lehnardt In-Reply-To: Date: Tue, 10 Jul 2012 15:28:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1482) X-Virus-Checked: Checked by ClamAV on apache.org On Jul 10, 2012, at 15:22 , Samuel Williams = wrote: > Hi, >=20 > This is probably awfully naive, but wouldn't it be possible to improve = the > efficiency of skip & limit by simply storing the number of children > documents for each node in the B tree? We do that as of 15941c1 (should be 1.2.0 and later). Cheers Jan --=20 >=20 > Kind regards, > Samuel