X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A9FC5D1B741 for ; Wed, 28 Jul 2004 00:34:14 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08758-07 for ; Wed, 28 Jul 2004 03:34:09 +0000 (GMT) Received: from www.postgresql.com (www.postgresql.com [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id ABA66D1BB4C for ; Wed, 28 Jul 2004 00:23:15 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by www.postgresql.com (Postfix) with ESMTP id 7A09ECF6BEC for ; Tue, 27 Jul 2004 12:34:35 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i6RFXJo2029488; Tue, 27 Jul 2004 11:33:20 -0400 (EDT) To: "Merlin Moncure" Cc: pgsql-performance@postgresql.org Subject: Re: best way to fetch next/prev record based on index In-reply-to: <6EE64EF3AB31D5448D0007DD34EEB34101AEFA@Herge.rcsinc.local> References: <6EE64EF3AB31D5448D0007DD34EEB34101AEFA@Herge.rcsinc.local> Comments: In-reply-to "Merlin Moncure" message dated "Tue, 27 Jul 2004 11:29:53 -0400" Date: Tue, 27 Jul 2004 11:33:19 -0400 Message-ID: <29487.1090942399@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/200 X-Sequence-Number: 7591 "Merlin Moncure" writes: > Plus, your where clause does not guarantee results. No, but in combination with the ORDER BY it does. Please note also that the offset would *always* be one, so your gripe about it not scaling seems misguided to me. regards, tom lane