Re: Default Stats Revisited - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Default Stats Revisited
Date
Msg-id 200403120440.i2C4eTo01503@candle.pha.pa.us
Whole thread Raw
In response to Re: Default Stats Revisited  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Default Stats Revisited  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Another idea is whether a foreign key column should get extra
> > statistics?
> 
> In practice, both ends of an FK relationship have to be indexed,
> so I don't see that we need any extra special case for that.

Do they?  We don't create an index automatically when using REFERENCES.
We do create an index for PRIMARY KEY.

I was just wondering if the REFERENCES column is more sensitive to join
usage and would benefit from more accurate statistics even if it doesn't
have an index.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: [pgsql-www] The Name Game: postgresql.net vs.
Next
From: Josh Berkus
Date:
Subject: Re: Default Stats Revisited