Re: Default Stats Revisited

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Default Stats Revisited
Дата
Msg-id 200403112047.25821.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Default Stats Revisited  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 BerkusAglio Database SolutionsSan Francisco



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Default Stats Revisited
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [pgsql-www] The Name Game: postgresql.net vs.