pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: ow <oneway_111@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: 7.4 - FK constraint performance
Date: Thu, 12 Feb 2004 08:04:53 -0800 (PST)
Message-ID: <20040212080217.A87422@megazone.bigpanda.com> (raw)
In-Reply-To: <20040212155351.34740.qmail@web60801.mail.yahoo.com>
References: <20040212155351.34740.qmail@web60801.mail.yahoo.com>

On Thu, 12 Feb 2004, ow wrote:

> --- Stephan Szabo <sszabo@megazone.bigpanda.com> wrote:
> > You also did the alter table to up the statistics target on the column,
> > right?
>
> Not really. I did not change the the default stats settings in the
> postgresql.conf. Not sure what needs to be changed, can you clarify?

Basically, run something like:
-- 1000 is just an arbitrary choice, but we can lower it later if this
-- works.
ALTER TABLE my.Large ALTER COLUMN small_id SET STATISTICS 1000;
ANALYZE my.Large;

This increases the target for just the column in question which means it
should have a better idea of the distribution and may make it make a
better guess if you've got a somewhat uneven distribution.




view thread (29+ messages)  latest in thread

Message-ID: <20040212080217.A87422@megazone.bigpanda.com>
Permalink:  ../20040212080217.A87422@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20040212080217.A87422@megazone.bigpanda.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-sql@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, oneway_111@yahoo.com
  Subject: Re: 7.4 - FK constraint performance
  In-Reply-To: <20040212080217.A87422@megazone.bigpanda.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