Re: Stats for multi-column indexes

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Stats for multi-column indexes
Дата
Msg-id 460015EE.90900@agliodbs.com
обсуждение исходный текст
Ответ на Re: Stats for multi-column indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Stats for multi-column indexes  (Jeff Davis <pgsql@j-davis.com>)
Re: Stats for multi-column indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Stats for multi-column indexes  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-hackers
Tom,

> Actually, I think you don't particularly need stats for that in most
> cases --- if the planner simply took note that the FK relationship
> exists, it would know that each row of the FK side joins to exactly
> one row of the PK side, which in typical cases is sufficient.

Is it?  What about the other direction?  Currently, doesn't the planner 
assume that the rowcount relationship is 1 to ( child total rows / 
parent total rows) ?  That's ok for tables with relatively even 
distribution, but not for skewed ones.

--Josh Berkus


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Effects of GUC settings on automatic replans
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Stats for multi-column indexes