Re: database performance and query performance question - Mailing list pgsql-performance

From Josh Berkus
Subject Re: database performance and query performance question
Date
Msg-id 200401221243.15312.josh@agliodbs.com
Whole thread Raw
In response to Re: database performance and query performance question  ("Shea,Dan [CIS]" <Dan.Shea@ec.gc.ca>)
List 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


pgsql-performance by date:

Previous
From: "Shea,Dan [CIS]"
Date:
Subject: Re: database performance and query performance question
Next
From: Hannu Krosing
Date:
Subject: Re: database performance and query performance question