Re: bad performances using hashjoin

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bad performances using hashjoin
Дата
Msg-id 20287.1108951277@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: bad performances using hashjoin  (Klint Gore <kg@kgb.une.edu.au>)
Ответы Re: bad performances using hashjoin
Список pgsql-performance
Klint Gore <kg@kgb.une.edu.au> writes:
> Is having an order by in a view legal?

Not according to the SQL spec, but PG has allowed it for several releases.
(The same goes for ORDER BY in a sub-select, which is actually pretty
much the same thing ...)

> If so, does it do 2 sorts when you sort by something else?

Yup.  It's something you'd only want for the topmost view in a stack,
IMHO.  A sort at a lower level is likely to be wasted effort.

            regards, tom lane

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