Re: database performance and query performance question

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Shea,Dan [CIS]" <Dan(dot)Shea(at)ec(dot)gc(dot)ca>, "'josh(at)agliodbs(dot)com'" <josh(at)agliodbs(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: database performance and query performance question
Date: 2004-01-22 20:43:15
Message-ID: 200401221243.15312.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dan,

> Something that I do not understand is why if you use a valid_time =
> '2004-01-22 00:00:00' the query will use the index but if you do a
> valid_time > '2004-01-22 00:00:00' it does not use the index?

Because of the expected number of rows to be returned. Take a look at the row
estimates on the forecastleelement scans.

You can improve these estimates by increasing the ANALYZE stats and/or running
ANALYZE more often. Of course, increasing the stats makes analyze run
slower ...

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Hannu Krosing 2004-01-22 20:46:46 Re: database performance and query performance question
Previous Message Shea,Dan [CIS] 2004-01-22 20:35:59 Re: database performance and query performance question