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 27B61974F for ; Sun, 15 Apr 2012 08:42:43 +0000 (UTC) Received: (qmail 29027 invoked by uid 500); 15 Apr 2012 08:42:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 28598 invoked by uid 500); 15 Apr 2012 08:42:39 -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 28573 invoked by uid 99); 15 Apr 2012 08:42:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 08:42:38 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of alon.keren@gmail.com designates 209.85.220.180 as permitted sender) Received: from [209.85.220.180] (HELO mail-vx0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 08:42:33 +0000 Received: by vcbfl10 with SMTP id fl10so4100403vcb.11 for ; Sun, 15 Apr 2012 01:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mBnq0VXxoYddC34l1SLerkVr/XXGX0HRY//9A3CrclE=; b=gQtyFJVXgiEGwSfccfaUTuLSg4Xa7H52xr5IkZaVYuelrGBT524h+VIqGHdRIIRVbn E09hJebo5CVXAX+zbN7w2Mnmb1vUBPtO9ww39n/JxHYJjzgr2iNOg6G3qhxN0Sz94kev pD/tCeqwxXiVvYqlVp/CZual8mIzu4O2s35bFxgdhpgfLag5nka2buCB0BIOcSFdqT2U DWzRY24n5DQVBnDAfTEYmCmzCSbes4KRVgDjayZPFh/Aftg55KOH6Seqvjve+/mO21d0 lSQQdkMDDy0UvPQkJEk7rS/9Stqam82OE3XWuQzROB+CI88WOskZdvxu1yI5qLrEIteE LwtQ== MIME-Version: 1.0 Received: by 10.220.59.3 with SMTP id j3mr4141523vch.58.1334479332793; Sun, 15 Apr 2012 01:42:12 -0700 (PDT) Received: by 10.52.65.42 with HTTP; Sun, 15 Apr 2012 01:42:12 -0700 (PDT) In-Reply-To: References: Date: Sun, 15 Apr 2012 11:42:12 +0300 Message-ID: Subject: Re: Reduce just N rows? From: Alon Keren To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=00235445ba88975e9c04bdb3ae7b X-Virus-Checked: Checked by ClamAV on apache.org --00235445ba88975e9c04bdb3ae7b Content-Type: text/plain; charset=ISO-8859-1 On 15 April 2012 03:48, Mark Hahn wrote: > IMHO, It isn't too much trouble to get just the list of all doc ids and the > do a batch query for the first 10. > Thanks. When starting out, I could very well adopt such a method. On the long run, however, I see these obstacles: 1. I would need to do this procedure per game type, whose numbers may very well reach the hundreds, or more 2. the number of games per game type would at least reach thousands, so fetching all keys is quite demanding 3. this data is for an often hit page > > Couch has a lot of places where multiple queries are required. I think if > you start to add sql features like LIMIT then you are starting down a > slippery slope towards couch losing it's simplicity. > You definitely have a point here. That's why I'm trying to find out if (a) others see the need for this feature and (b) if it can be *relatively* simple to implement. Alon --00235445ba88975e9c04bdb3ae7b--