| От | Tom Lane |
|---|---|
| Тема | Re: Performance question (stripped down the problem) |
| Дата | |
| Msg-id | 28138.1000907704@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Performance question (stripped down the problem) ("Matt Block" <matt@blockdev.net>) |
| Ответы |
Re: Performance question (stripped down the problem)
|
| Список | pgsql-general |
"Matt Block" <matt@blockdev.net> writes:
> I've not yet looked at the rest of the problem, but doesn't
> ORDER BY make GROUP BY redundant? Just an extra sort?
No. In the first place, there's no extra sort: the planner is well
aware that our current GROUP BY implementation produces ordered output.
In the second place, there's no guarantee that GROUP BY will always
produce ordered output in the future --- we are thinking about changing
over to a hash-table-based implementation of grouping. If you want
ordered output, you should say ORDER BY, not try to outsmart the system.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера