pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oleg Bartunov <oleg@sai.msu.su>
To: PFC <lists@boutiquenumerique.com>
Cc: alex@neteconomist.com, Greg Stark <gsstark@mit.edu>
Cc: Merlin Moncure <merlin.moncure@rcsonline.com>
Cc: Andrei Bintintan <klodoma@ar-sd.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: [SQL] OFFSET impact on Performance???
Date: Thu, 27 Jan 2005 14:19:35 +0300 (MSK)
Message-ID: <Pine.GSO.4.62.0501271415370.6701@ra.sai.msu.su> (raw)
In-Reply-To: <opsk9cicntth1vuj@musicbox>
References: <6EE64EF3AB31D5448D0007DD34EEB3412A75CB@Herge.rcsinc.local>
	<87brbiah0f.fsf@stark.xeocode.com>
	<opsk7nngxwth1vuj@musicbox>
	<33c6269f0501261035bc87695@mail.gmail.com>
	<opsk8a28tcth1vuj@musicbox>
	<33c6269f05012620427c1ccc40@mail.gmail.com>
	<opsk89szusth1vuj@musicbox>
	<Pine.GSO.4.62.0501271332200.6701@ra.sai.msu.su>
	<opsk9cicntth1vuj@musicbox>

On Thu, 27 Jan 2005, PFC wrote:

>
>>> 	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.

for example, 
http://www.sai.msu.su/~megera/postgres/gist/code/7.3/README.intarray
see OPERATIONS and EXAMPLE USAGE:

SELECT * FROM table WHERE id && int[]


> 	Thanks.
>

 	Regards,
 		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83



view thread (50+ messages)  latest in thread

Message-ID: <Pine.GSO.4.62.0501271415370.6701@ra.sai.msu.su>
Permalink:  ../Pine.GSO.4.62.0501271415370.6701@ra.sai.msu.su/
Also on:    postgresql.org/message-id/Pine.GSO.4.62.0501271415370.6701@ra.sai.msu.su

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: oleg@sai.msu.su, lists@boutiquenumerique.com, gsstark@mit.edu, merlin.moncure@rcsonline.com, klodoma@ar-sd.net
  Subject: Re: [SQL] OFFSET impact on Performance???
  In-Reply-To: <Pine.GSO.4.62.0501271415370.6701@ra.sai.msu.su>
  References: <6EE64EF3AB31D5448D0007DD34EEB3412A75CB@Herge.rcsinc.local> <87brbiah0f.fsf@stark.xeocode.com> <opsk7nngxwth1vuj@musicbox> <33c6269f0501261035bc87695@mail.gmail.com> <opsk8a28tcth1vuj@musicbox> <33c6269f05012620427c1ccc40@mail.gmail.com> <opsk89szusth1vuj@musicbox> <Pine.GSO.4.62.0501271332200.6701@ra.sai.msu.su> <opsk9cicntth1vuj@musicbox> <Pine.GSO.4.62.0501271415370.6701@ra.sai.msu.su>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox