Re: new correlation metric
От | Tom Lane |
---|---|
Тема | Re: new correlation metric |
Дата | |
Msg-id | 22941.1225053088@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: new correlation metric (Jeff Davis <pgsql@j-davis.com>) |
Список | pgsql-hackers |
Jeff Davis <pgsql@j-davis.com> writes: > On Sun, 2008-10-26 at 12:44 -0400, Tom Lane wrote: >> We might need to invent some >> other catalog besides pg_statistic if we want to represent per-index >> properties like correlation. > Why can't we just use pg_statistic with the starelid set to the index > oid? Well, because pg_statistic is built for per-column stats. You'd have to invent some value for staattnum, which would be problematic for views like pg_stats that expect it to join to a valid pg_attribute row; and you'd have useless columns like stanullfrac and stadistinct. There's no problem with using pg_statistic for stats that correspond to individual index columns (and in fact we do that already); but ISTM the point here is that correlation/ordering is about the index as a whole, not any one column of it. regards, tom lane
В списке pgsql-hackers по дате отправления: