pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <pg@rbt.ca>
To: Michiel Meeuwissen <Michiel.Meeuwissen@omroep.nl>
Cc: performance@postgresql.org
Subject: Re: order by index, and inheritance
Date: Thu, 22 Apr 2004 10:46:40 -0400
Message-ID: <1082645200.91360.24.camel@jester> (raw)
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>


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




view thread (5+ messages)

Message-ID: <1082645200.91360.24.camel@jester>
Permalink:  ../1082645200.91360.24.camel@jester/
Also on:    postgresql.org/message-id/1082645200.91360.24.camel@jester

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pg@rbt.ca, Michiel.Meeuwissen@omroep.nl, performance@postgresql.org
  Subject: Re: order by index, and inheritance
  In-Reply-To: <1082645200.91360.24.camel@jester>

* 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