Re: Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed

Поиск
Список
Период
Сортировка
От Matthew Wakeling
Тема Re: Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed
Дата
Msg-id alpine.DEB.1.10.0811121723560.4666@aragorn.flymine.org
обсуждение исходный текст
Ответ на Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed  ("Andrus" <kobruleht2@hot.ee>)
Список pgsql-performance
Firstly, please upgrade to Postgres 8.3 if possible.

On Wed, 12 Nov 2008, Andrus wrote:
> There are columns
> kuupaev date,  cr char(10), db char(10)
> and regular indexes  for all those fields.

Create a single index on (cr, db, datecol).

Matthew

--
Those who do not understand Unix are condemned to reinvent it, poorly.
                -- Henry Spencer

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

Предыдущее
От:
Дата:
Сообщение: Re: slow full table update
Следующее
От: "Vladimir Sitnikov"
Дата:
Сообщение: Re: Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed