X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9BEF3D1CCA2 for ; Sat, 24 Apr 2004 01:29:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 05183-06 for ; Sat, 24 Apr 2004 01:29:39 -0300 (ADT) Received: from ganymede.hub.org (u46n208.hfx.eastlink.ca [24.222.46.208]) by svr1.postgresql.org (Postfix) with ESMTP id D7F49D1CB1D for ; Sat, 24 Apr 2004 01:29:38 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id 52E8B3429B; Sat, 24 Apr 2004 01:29:38 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 521D0341C6 for ; Sat, 24 Apr 2004 01:29:38 -0300 (ADT) X-Received: from localhost ([unix socket]) by ganymede.hub.org (Cyrus v2.2.3) with LMTP; Thu, 22 Apr 2004 11:50:38 -0300 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 94BA537628 for ; Thu, 22 Apr 2004 11:50:35 -0300 (ADT) X-Received: from mail.postgresql.org [200.46.204.71] by localhost with IMAP (fetchmail-6.2.5) for scrappy@localhost (single-drop); Thu, 22 Apr 2004 11:50:35 -0300 (ADT) X-Received: from svr1.postgresql.org ([unix socket]) by svr1.postgresql.org (Cyrus v2.2.3) with LMTP; Thu, 22 Apr 2004 11:46:45 -0300 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 842ECD1D09C for ; Thu, 22 Apr 2004 11:46:44 -0300 (ADT) X-Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 84786-01 for ; Thu, 22 Apr 2004 11:46:47 -0300 (ADT) X-Received: from tht.net (vista.tht.net [216.126.88.2]) by svr1.postgresql.org (Postfix) with ESMTP id DEC58D1CCB1 for ; Thu, 22 Apr 2004 11:46:42 -0300 (ADT) X-Received: from [134.22.70.203] (dyn-70-203.tor.dsl.tht.net [134.22.70.203]) by tht.net (Postfix) with ESMTP id 1677976AA2; Thu, 22 Apr 2004 10:46:50 -0400 (EDT) Subject: Re: order by index, and inheritance From: Rod Taylor To: Michiel Meeuwissen Cc: performance@postgresql.org In-Reply-To: <20040422144023.GI6870@michiel.omroep.nl> References: <20040419113013.GA32186@michiel.omroep.nl> <1082455997.57436.10.camel@jester> <20040420104518.GF1618@michiel.omroep.nl> <1082461767.57436.93.camel@jester> <20040422110214.GH6870@michiel.omroep.nl> <1082641607.91360.2.camel@jester> <20040422144023.GI6870@michiel.omroep.nl> Content-Type: text/plain Message-Id: <1082645200.91360.24.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 22 Apr 2004 10:46:40 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-DCC: : X-Spam-Pyzor: ReSent-Date: Sat, 24 Apr 2004 01:29:33 -0300 (ADT) Resent-From: "Marc G. Fournier" Resent-To: pgsql-performance@postgresql.org ReSent-Subject: Re: [PERFORM] order by index, and inheritance ReSent-Message-ID: <20040424012933.R42925@ganymede.hub.org> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/423 X-Sequence-Number: 6723 > This indeeds performs good (about 10000 times faster then select number,url > from mm_mediasources order by number desc limit 20) . But hardly beautiful, > and quite useless too because of course I am now going to want to use an > offset (limit 20 offset 20, you see..), which seems more or less impossible > in this way, isn't it. Yes, and the offset is a good reason why PostgreSQL will not be able to do it by itself either. Is "number" unique across the board? If so, instead of the offset you could use WHERE number > $lastValue.