pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Troels Arvin <troels@arvin.dk>
To: pgsql-sql@postgresql.org
Subject: Re: Quota query with decent performance?
Date: Tue, 18 Nov 2003 16:06:36 +0100
Message-ID: <pan.2003.11.18.15.06.32.806768@arvin.dk> (raw)
References: <pan.2003.11.11.22.58.08.758402@arvin.dk>
	<Pine.BSO.4.44.0311111832190.19584-100000@detroit.arbor.net>
	<pan.2003.11.17.22.55.52.997736@arvin.dk>
	<20031118125642.GC30809@wolff.to>
	<pan.2003.11.18.14.21.43.529784@arvin.dk>
	<20031118143627.GA32105@wolff.to>

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





view thread (13+ messages)

Message-ID: <pan.2003.11.18.15.06.32.806768@arvin.dk>
Permalink:  ../pan.2003.11.18.15.06.32.806768@arvin.dk/
Also on:    postgresql.org/message-id/pan.2003.11.18.15.06.32.806768@arvin.dk

 · 

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-sql@postgresql.org
  Cc: troels@arvin.dk
  Subject: Re: Quota query with decent performance?
  In-Reply-To: <pan.2003.11.18.15.06.32.806768@arvin.dk>

* 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