Ben <midfield@gmail.com> wrote:
> PostgreSQL 9.1.1 on x86_64-suse-linux-gnu, compiled by gcc (SUSE Linux) 4.6.2, 64-bit
Consider applying the latest bug fixes for 9.1 -- which would leave
you showing 9.1.9.
http://www.postgresql.org/support/versioning/
> default_statistics_target | 50 | configuration file
Why did you change this from the default of 100?
> effective_cache_size | 5632MB | configuration file
How much RAM is on this machine? What else is running on it?
(Normally people set this to 50% to 75% of total RAM. Lower values
discourage index usage in queries like your example.)
Do you get a different plan if you set cpu_tuple_cost = 0.03? How
about 0.05? You can set this just for a single connection and run
explain on the query to do a quick check.
--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company