| От | Tom Lane |
|---|---|
| Тема | Re: NULLS LAST performance |
| Дата | |
| Msg-id | 7345.1298497054@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: NULLS LAST performance (Merlin Moncure <mmoncure@gmail.com>) |
| Ответы |
Re: NULLS LAST performance
|
| Список | pgsql-performance |
Merlin Moncure <mmoncure@gmail.com> writes:
> you can always do this:
> create index performance_creation_date_desc_idx on
> performance(creation_date desc nulls last);
> which will index optimize your sql. Interesting that 'null last'
> fools disallows index usage even when the index was created with
> nullls last as the default.
The problem is that his query needs to scan the index in DESC order,
which means it's effectively NULLS FIRST, which doesn't match the
requested sort order.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера