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 159743A5E04 for ; Thu, 27 Jan 2005 10:50:47 +0000 (GMT) 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 39792-01 for ; Thu, 27 Jan 2005 10:50:43 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id 2DD563A5E36 for ; Thu, 27 Jan 2005 10:50:44 +0000 (GMT) Received: (qmail 11148 invoked from network); 27 Jan 2005 11:51:01 +0100 Received: from unknown (HELO musicbox) (boutiquenumerique-lists@192.168.0.2) by boutiquenumerique.com with SMTP; 27 Jan 2005 11:51:01 +0100 To: "Oleg Bartunov" Cc: alex@neteconomist.com, "Greg Stark" , "Merlin Moncure" , "Andrei Bintintan" , pgsql-performance@postgresql.org Subject: Re: [SQL] OFFSET impact on Performance??? References: <6EE64EF3AB31D5448D0007DD34EEB3412A75CB@Herge.rcsinc.local> <87brbiah0f.fsf@stark.xeocode.com> <33c6269f0501261035bc87695@mail.gmail.com> <33c6269f05012620427c1ccc40@mail.gmail.com> Message-ID: From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Thu, 27 Jan 2005 11:52:50 +0100 In-Reply-To: User-Agent: Opera M2/7.54 (Linux, build 751) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/531 X-Sequence-Number: 10221 >> The best part is that you can skip the LIMIT/OFFSET entirely if you >> put page numbers in your cache table while inserting into it, via a >> temporary sequence or something. Retrieving the results will then be >> very fast, but beware that SELECT * FROM table WHERE id =ANY( array ) >> won't use an index, so > > contrib/intarray provides index access to such queries. Can you provide an example of such a query ? I've looked at the operators for intarray without finding it. Thanks.