Re: 7.4 - FK constraint performance

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: ow <oneway_111(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: 7.4 - FK constraint performance
Date: 2004-02-12 16:04:53
Message-ID: 20040212080217.A87422@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

On Thu, 12 Feb 2004, ow wrote:

> --- Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-02-12 16:05:18 Re: implemented missing bitSetBit() and bitGetBit()
Previous Message Rod Taylor 2004-02-12 16:02:47 Re: How can I have 2 completely seperated databases in

Browse pgsql-sql by date

  From Date Subject
Next Message beyaRecords - The home Urban music 2004-02-12 17:05:04 test
Previous Message Tom Lane 2004-02-12 15:54:20 Re: 7.4 - FK constraint performance