Re: Optimizing maximum/minimum queries (yet again)

Список
Период
Сортировка
От Tom Lane
Тема Re: Optimizing maximum/minimum queries (yet again)
Дата
Msg-id 18846.1113017775@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Optimizing maximum/minimum queries (yet again)  (Bruno Wolff III)
Список pgsql-hackers
Bruno Wolff III <> writes:
>   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);

> 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?

Hmm ... we might have to hack the LIMIT step to skip over NULLs.
Doesn't seem like an insurmountable issue though.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Optimizing maximum/minimum queries (yet again)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Optimizing maximum/minimum queries (yet again)