Skip site navigation (1) Skip section navigation (2)

Re: order by index, and inheritance

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Michiel Meeuwissen <Michiel(dot)Meeuwissen(at)omroep(dot)nl>
Cc: performance(at)postgresql(dot)org
Subject: Re: order by index, and inheritance
Date: 2004-04-22 14:46:40
Message-ID: 1082645200.91360.24.camel@jester (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
> 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.

In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2004-04-22 15:54:48
Subject: Re: [PERFORM] MySQL vs PG TPC-H benchmarks
Previous:From: Michiel MeeuwissenDate: 2004-04-22 14:40:23
Subject: Re: order by index, and inheritance

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group