Re: Seeking performance advice: Index for "recent entries"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Seeking performance advice: Index for "recent entries"
Дата
Msg-id 20217.1336574193@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Seeking performance advice: Index for "recent entries"  (Chris Angelico <rosuav@gmail.com>)
Ответы Re: Seeking performance advice: Index for "recent entries"  (Chris Angelico <rosuav@gmail.com>)
Список pgsql-general
Chris Angelico <rosuav@gmail.com> writes:
> On Wed, May 9, 2012 at 2:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think this falls under the rubric of "premature optimization is the
>> root of all evil". �Just use a plain index on the timestamptz column
>> and be happy. �Searches that only look at the extremal values of a
>> column work perfectly well with a full index, because they only need to
>> examine a small range of the index.

> The index is actually on two columns, an account ID followed by the
> effective date - I need to look up whether any particular account has
> recent entries. Does that make any difference?

Should still work all right, though you might want to check plans and
timings on some test data to be sure.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Harley
Дата:
Сообщение: Re: relpages sudden increase
Следующее
От: Chris Angelico
Дата:
Сообщение: Re: Seeking performance advice: Index for "recent entries"