Re: Query question

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Query question
Дата
Msg-id 200311122120.28882.josh@agliodbs.com
обсуждение исходный текст
Ответ на Query question  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Ответы Re: Query question  (Neil Conway <neilc@samurai.com>)
Список pgsql-performance
Chris,

> SELECT * FROM (arbitrary subquery) AS sub ORDER BY 1,3;
>
> Now, this all works fine, but I want to know if this is efficient or not.
>
> Does doing a select of a select cause serious performance degradation?

It would be better if you could strip out the inner sort, but I can understand
why that might not be possible in all cases.

The only thing you're adding to the query is a second SORT step, so it
shouldn't require any more time/memory than the query's first SORT did.

--
Josh Berkus
Aglio Database Solutions
San Francisco

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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: performance optimzations
Следующее
От: Suchandra Thapa
Дата:
Сообщение: Re: performance optimzations