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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux