Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 46578 invoked from network); 13 Apr 2009 01:43:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Apr 2009 01:43:42 -0000 Received: (qmail 42942 invoked by uid 500); 13 Apr 2009 01:43:41 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 42873 invoked by uid 500); 13 Apr 2009 01:43:41 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 42863 invoked by uid 99); 13 Apr 2009 01:43:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2009 01:43:41 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [165.91.22.120] (HELO sr-6-int.cis.tamu.edu) (165.91.22.120) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2009 01:43:33 +0000 Received: from localhost (localhost.tamu.edu [127.0.0.1]) by sr-6-int.cis.tamu.edu (Postfix) with ESMTP id 02586296276 for ; Sun, 12 Apr 2009 20:43:13 -0500 (CDT) X-Virus-Scanned: amavisd-new at tamu.edu Received: from [128.194.150.24] (vpn-24.cs.tamu.edu [128.194.150.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sr-6-int.cis.tamu.edu (Postfix) with ESMTPSA id 8AC4E295278 for ; Sun, 12 Apr 2009 20:43:12 -0500 (CDT) Message-ID: <49E298B0.5000501@tamu.edu> Date: Sun, 12 Apr 2009 20:43:12 -0500 From: Paul Logasa Bogen II User-Agent: Thunderbird 2.0.0.21 (X11/20090319) MIME-Version: 1.0 To: user@cayenne.apache.org Subject: Re: Slow Return on Paginated SelectQuery References: <49E28A78.2030700@tamu.edu> <5adb61290904121752y6ad527b9q18fdc862cde479ba@mail.gmail.com> <7e3605160904121800h694e28c1jee9f961b40d1adf0@mail.gmail.com> In-Reply-To: <7e3605160904121800h694e28c1jee9f961b40d1adf0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org So I should just bite the bullet and loop over subqueries using limit then? Or is there a more Cayenne way to do it? plb Kevin Menard wrote: > Assuming monotonically increasing PKs, you shouldn't really need to pull all > the PKs in. SELECT, ORDER BY, and LIMIT will serve well enough. >