Re: Quota query with decent performance? - Mailing list pgsql-sql

From Chester Kustarz
Subject Re: Quota query with decent performance?
Date
Msg-id Pine.BSO.4.44.0311111832190.19584-100000@detroit.arbor.net
Whole thread Raw
In response to Quota query with decent performance?  (Troels Arvin <troels@arvin.dk>)
List pgsql-sql
maybe:

select *
from person
where age <=
(select age from person order by age limit 1 offset 2);

7.20 msec

assuming it does what you want.

On Tue, 11 Nov 2003, Troels Arvin wrote:
> An example of a quota query could be to get the top-3 youngest people from
> a collection of people. The complicated part is that such a query might
> return more than 3 rows in some tie situations.



pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Quota query with decent performance?
Next
From: Tom Lane
Date:
Subject: Re: Quota query with decent performance?