| От | Tom Lane |
|---|---|
| Тема | Re: Optimizer sorting an already sorted result |
| Дата | |
| Msg-id | 12174.1209520924@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Optimizer sorting an already sorted result ("Gurjeet Singh" <singh.gurjeet@gmail.com>) |
| Список | pgsql-hackers |
"Gurjeet Singh" <singh.gurjeet@gmail.com> writes:
> In the plan below, we can see that the optimizer is sorting an already
> sorted result. It seems to forget the sort order across the UNIQUE node. My
> question is, do we make any attempts in the optimizer to remember the sort
> order of a result, to avoid any further sorting on same sort-key? If not,
> can we do something about it?
Per the comment in create_unique_path:
/* * Treat the output as always unsorted, since we don't necessarily have * pathkeys to represent it. */
pathnode->path.pathkeys= NIL;
No doubt this could be improved, but I'm unsure about the effort/reward
ratio.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера