Re: ORDER BY

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: ORDER BY
Дата
Msg-id 20050725220027.GZ29346@decibel.org
обсуждение исходный текст
Ответ на ORDER BY  ("Marc G. Fournier" <scrappy@postgresql.org>)
Список pgsql-hackers
On Mon, Jul 25, 2005 at 06:11:08PM -0300, Marc G. Fournier wrote:
> 
> Just curious as to whether or not a warning or something should be issued 
> in a case like:
> 
>   SELECT c.*
>     FROM company c, company_summary cs
>    WHERE c.id = cs.id
>      AND cs.detail = 'test'
> ORDER BY cs.fullname;
> 
> Unless I'm missing something, the ORDER BY clause has no effect, but an 
> EXPLAIN shows it does take extra time, obviously ...

Uh, I'd hope it had an effect. Note that RDBMSes have been moving
towards allowing fields in ORDER BY that aren't in the SELECT list,
though in the past it was common that anything in ORDER BY had to also
be in SELECT.
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: More buildfarm stuff
Следующее
От: "Matt Emmerton"
Дата:
Сообщение: Re: ORDER BY