| От | Nick Fankhauser |
|---|---|
| Тема | Re: Problem with indexes, LIMIT, ORDER BY ... DESC |
| Дата | |
| Msg-id | NEBBLAAHGLEEPCGOBHDGAEHAFBAA.nickf@ontko.com обсуждение |
| Ответ на | Problem with indexes, LIMIT, ORDER BY ... DESC (Ken Williams <ken@mathforum.org>) |
| Список | pgsql-general |
Ken- I'd suggest trying the index with the date first, or even indexing them separately. Essentially, it looks like the index works as expected to selected the candidate rows, but since date isn't the initial part of the index, the index can't be used for the sort that must be done on the entire set of candidates before the first one is selected. BTW, I believe there is a "max" function that you might be able to use on this. It may amount to the same operations as far as the planner goes, but it gives you one more option to play with. Regards, -Nick -------------------------------------------------------------------------- Nick Fankhauser nickf@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko & Co. Software Consulting Services http://www.ontko.com/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера