Re: Problem with n_distinct being consistently inaccurate.

Поиск
Список
Период
Сортировка
От Nick Fankhauser
Тема Re: Problem with n_distinct being consistently inaccurate.
Дата
Msg-id NEBBLAAHGLEEPCGOBHDGKEJAIJAA.nickf@ontko.com
обсуждение исходный текст
Ответ на Re: Problem with n_distinct being consistently inaccurate.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Problem with n_distinct being consistently inaccurate.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
> It certainly should be the case.  starelid matches to pg_class.oid and
> staattnum matches to pg_attribute.attnum.

My problem was that I was looking up "event_date_time" in pg_class.relname
(and finding it), but the oid matched nothing. when I looked for 'event' in
pg_class & 'event_date_time' in pg_attribute, everything became clear.

So... I updated stadistinct to the actual value of 92,000 as you suggested
and as you predicted, it did not change the plan a bit. I guess I'll look
elsewhere for ways to optimize this query.

Thanks!

-Nick



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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: help needed!!!
Следующее
От: "Mark Carew"
Дата:
Сообщение: Re: steps to ensure referential integrity