pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: Ben <midfield@gmail.com>
To: bricklen <bricklen@gmail.com>
Cc: pgsql-performance@postgresql.org list <pgsql-performance@postgresql.org>
Subject: Re: incorrect row estimates for primary key join
Date: Tue, 25 Jun 2013 06:20:29 -0700 (PDT)
Message-ID: <1372166429.65996.YahooMailNeo@web162901.mail.bf1.yahoo.com> (raw)
In-Reply-To: <9A75BF4B-0458-43E3-803B-E25BB1984A39@gmail.com>
References: <7D0DD8B1-D23C-4BBC-9AB2-20D81F0B4BB8@gmail.com>
	<CAGrpgQ9=Oz5ZPgmP5JGfX_HHeHe1=z6m-JCMhhE=JautW7Xxtw@mail.gmail.com>
	<9A75BF4B-0458-43E3-803B-E25BB1984A39@gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


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



view thread (11+ messages)  latest in thread

Message-ID: <1372166429.65996.YahooMailNeo@web162901.mail.bf1.yahoo.com>
Permalink:  ../1372166429.65996.YahooMailNeo@web162901.mail.bf1.yahoo.com/
Also on:    postgresql.org/message-id/1372166429.65996.YahooMailNeo@web162901.mail.bf1.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: kgrittn@ymail.com, midfield@gmail.com, bricklen@gmail.com
  Subject: Re: incorrect row estimates for primary key join
  In-Reply-To: <1372166429.65996.YahooMailNeo@web162901.mail.bf1.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox