Re: Optimizing maximum/minimum queries (yet again) - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: Optimizing maximum/minimum queries (yet again)
Date
Msg-id 20050409020622.GB3177@wolff.to
Whole thread Raw
In response to Optimizing maximum/minimum queries (yet again)  (Tom Lane)
Responses Re: Optimizing maximum/minimum queries (yet again)  (Tom Lane)
List pgsql-hackers
On Fri, Apr 08, 2005 at 20:50:09 -0400, Tom Lane <> wrote:
> 
>     SELECT (SELECT x FROM tab WHERE ... ORDER BY x LIMIT 1),
>            (SELECT y FROM tab WHERE ... ORDER BY y DESC LIMIT 1);
> Comments?  Anyone see anything I missed?

Are NULLs a problem? In the second case above, wouldn't you get NULL
instead of the value returned by max if there were some NULL and some
not NULL values?


pgsql-hackers by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Optimizing maximum/minimum queries (yet again)
Next
From: Bruno Wolff III
Date:
Subject: Re: Optimizing maximum/minimum queries (yet again)