Re: incorrect row estimates for primary key join - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: incorrect row estimates for primary key join
Date
Msg-id 1372166429.65996.YahooMailNeo@web162901.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: incorrect row estimates for primary key join  (Ben <midfield@gmail.com>)
Responses Re: incorrect row estimates for primary key join
List pgsql-performance
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


pgsql-performance by date:

Previous
From: Emrah Mehmedov
Date:
Subject: Re: PHP Postgres query slower then PgAdmin
Next
From: Julien Cigar
Date:
Subject: Re: incorrect row estimates for primary key join