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")
Список: pgsql-performance

Скрыть дерево обсуждения

Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed  ("Andrus", )
 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  ("Vladimir Sitnikov", )
  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  ("Andrus", )
    Re: Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed  ("Vladimir Sitnikov", )
     Re: Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed  ("Andrus", )
 Re: Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed  (hubert depesz lubaczewski, )
  Re: Increasing select max(datecol) from bilkaib wheredatecol<=date'2008-11-01' and (cr='00' or db='00') speed  ("Andrus", )

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 по дате сообщения:

От: "Scott Marlowe"
Дата:
Сообщение: Re: slow full table update
От: "Scott Marlowe"
Дата:
Сообщение: Re: Disk usage question