Re: "Bug" in statistics for v7.2?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "Bug" in statistics for v7.2?
Дата
Msg-id 28970.1013616667@sss.pgh.pa.us
обсуждение исходный текст
Ответ на "Bug" in statistics for v7.2?  ("Marc G. Fournier" <scrappy@hub.org>)
Список pgsql-hackers
"Marc G. Fournier" <scrappy@hub.org> writes:
> Okay, if I'm understanding pg_stats at all, which I may not be, n_distinct
> should represent # of distinct values in that row, no?
> But, I have one field that has 5 distinct values:
> But pg_stats is reporting 1:

The pg_stats values are only, um, statistical.  If 99.9% of the table is
the same value and the other four values appear only once or twice, it's
certainly possible for ANALYZE's sample to include only the common value
and miss the rare ones.  AFAIK that will not break anything; if you have
an example where the planner seems to be fooled because of this, let's
see it.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: alter table drop column status
Следующее
От: Brian Hirt
Дата:
Сообщение: FATAL 2:  XLogFlush: request is not satisfied