Re: ORDER BY

Поиск
Список
Период
Сортировка
Искать
От
Gurjeet Singh
Тема
Re: ORDER BY
Дата
Msg-id
65937bea0611201905v3f5adf02r254d82cc6d26f641@mail.gmail.com
Ответ на
Re: ORDER BY (Harald Fuchs)
Список
Дерево обсуждения
Re: ORDER BY Harald Fuchs <hf1110x@protecting.net>
Re: ORDER BY "Gurjeet Singh" <singh.gurjeet@gmail.com>
On 16 Nov 2006 11:04:15 +0100, Harald Fuchs <hf1110x@protecting.net> wrote:
Why so complicated?

SELECT whatever FROM foo ORDER BY name = 'Other', name

This is by far the simplest (and intelligent) of them all. And it will use a single scan of the underlying table (or index, if used), so should prove to be faster than the other UNION schemes.

Another tweak: If possible, use the integer column (ID) instead of the Name column.

Regards,

--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com
В списке pgsql-general по дате отправления
От: Frank Millman
Дата:
От: A. Kretschmer
Дата:
FAQ