Re: Quota query with decent performance?

From: Troels Arvin <troels(at)arvin(dot)dk>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Quota query with decent performance?
Date: 2003-11-18 15:06:36
Message-ID: pan.2003.11.18.15.06.32.806768@arvin.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 18 Nov 2003 08:36:27 -0600, Bruno Wolff III wrote:

> The standard syntax is expression is false instead of
> isfalse(expression)

OK, so I guess that a 'better' (closer to standard) version of your query
would be:

SELECT *
FROM pview
WHERE (
age <= (
SELECT age FROM pview
ORDER BY age ASC
LIMIT 1 OFFSET 20 -- 2=n-1
)
) IS NOT FALSE;

--
Greetings from Troels Arvin, Copenhagen, Denmark

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Boes 2003-11-18 18:41:31 Need query to separate rows by one field's value
Previous Message Bruno Wolff III 2003-11-18 14:45:57 Re: Quota query with decent performance?