pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Anthony Presley <anthony@resolution.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Cc: Erik Van Gilder <evg@resolution.com>
Subject: Re: 8.4.4, 9.0, and 9.1 Planner Differences
Date: Sat, 22 Oct 2011 22:31:59 -0400
Message-ID: <20459.1319337119@sss.pgh.pa.us> (raw)
In-Reply-To: <CAO2AxyrxQ=4sD7OnUuz8AADBs5176M=dQ-MhFbWLGJ3aDj=kJQ@mail.gmail.com>
References: <CAO2Axyqa6afvk+LFTz4yJLBOSFA4LeXQ-KuzeQ5dJXLH=MnQUA@mail.gmail.com>
	<9317.1319299106@sss.pgh.pa.us>
	<CAO2AxyrxQ=4sD7OnUuz8AADBs5176M=dQ-MhFbWLGJ3aDj=kJQ@mail.gmail.com>

Anthony Presley <anthony@resolution.com> writes:
> I have tried setting the statistics on employee.user_id to be 100 and 1000,
> and the rest are the default (100).

> I've run both an "ANALYZE" and a "VACUUM ANALYZE" on the production system -
> both "generally", and on each of the above tables (employee, app_user,
> location, preference).

> Here's an updated explain of the most recent attempt.  About 5 minutes after
> I analyzed them:
>   http://explain.depesz.com/s/G32

Looks like the biggest estimation errors are on the location_id joins.
Maybe you should be cranking up the stats targets on those columns.

			regards, tom lane



view thread (4+ messages)

Message-ID: <20459.1319337119@sss.pgh.pa.us>
Permalink:  ../20459.1319337119@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20459.1319337119@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, anthony@resolution.com, evg@resolution.com
  Subject: Re: 8.4.4, 9.0, and 9.1 Planner Differences
  In-Reply-To: <20459.1319337119@sss.pgh.pa.us>

* 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