From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Default Stats Revisited |
Date: | 2004-03-12 04:47:25 |
Message-ID: | 200403112047.25821.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce,
> 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.
I don't think so. If one does not create an index on an FK column, this is
usually because the column does not have enough of a range of values to
deserve indexing (for example, 4 potential values across 100,000 records).
In that case, we would not want to up the statistics either.
And we haven't made it a practice to hand-hold for database designers who
don't know when to index, so I don't think we should start now.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2004-03-12 06:32:26 | Re: [HACKERS] The Name Game: postgresql.net vs. |
Previous Message | Bruce Momjian | 2004-03-12 04:40:29 | Re: Default Stats Revisited |