Re: Problem with indexes, LIMIT, ORDER BY ... DESC

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Yutaka tanida
Дата:
Сообщение: Re: [HACKERS] PostgreSQL and Windows2000 and defunct processes
Следующее
От: Wim
Дата:
Сообщение: HELP! Cannot access table!!!!