| От | Tom Lane |
|---|---|
| Тема | Re: Any better plan for this query?.. |
| Дата | |
| Msg-id | 13070.1242737905@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Any better plan for this query?.. (Simon Riggs <simon@2ndQuadrant.com>) |
| Ответы |
Re: Any better plan for this query?..
|
| Список | pgsql-performance |
Simon Riggs <simon@2ndQuadrant.com> writes:
> Both plans for this query show an IndexScan on a two column-index, with
> an Index Condition of equality on the leading column. The ORDER BY
> specifies a sort by the second index column, so the top-level Sort is
> superfluous in this case.
> My understanding is that we don't currently eliminate superfluous
> additional sorts of this kind.
Nonsense. The planner might think some other plan is cheaper, but
it definitely knows how to do this, and has since at least 8.1.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера