Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?
Дата
Msg-id 4732633E.9080704@fuzzy.cz
обсуждение исходный текст
Ответ на Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> Reece Hart <reece@harts.net> writes:
>> However, it's not clear that you've considered a clause like 'ORDER BY
>> (foo IS NULL), foo', which I believe is not implementation dependent.
>
> Yeah, that should work reasonably portably ... where "portable" means
> "equally lousy performance in every implementation", unfortunately :-(.
> I rather doubt that many implementations will see through that to decide
> that they can avoid an explicit sort.

Well, an index on ((foo IS NULL), foo) might improve the performance
when sorting along these columns, but sure it's not a cure-all. And you
still have to modify the SQL and the database schema ...

regards
TV

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

Предыдущее
От: Kevin Neufeld
Дата:
Сообщение: System V IPC on Windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Recovering / undoing transactions?