Re: BUG #7619: Query cost estimate appears to not use n_distinct setting

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: BUG #7619: Query cost estimate appears to not use n_distinct setting
Дата
Msg-id 50868E72.6020306@ringerc.id.au
обсуждение исходный текст
Ответ на BUG #7619: Query cost estimate appears to not use n_distinct setting  (niko.kiirala@mapvision.fi)
Список pgsql-bugs
On 10/23/2012 06:46 PM, niko.kiirala@mapvision.fi wrote:
> The following bug has been logged on the website:
>
> Bug reference:      7619
> Logged by:          Niko Kiirala
> Email address:      niko.kiirala@mapvision.fi
> PostgreSQL version: 9.2.1
> Operating system:   Windows 7 SP 1 (64-bit)
> Description:
>
> I am working on a potentially large database table, let's call it
> "observation", that has a foreign key to table "measurement". Each
> measurement is associated with either none or around five observations. In
> this kind of situation, it is well known that the statistics on the foreign
> key column in observation table can get arbitrarily bad as the row count
> increases. Especially, the estimate of the number of distinct values in the
> foreign key column can be completely off.

For anyone wondering why this feels familiar, the same message was
posted to pgsql-performance earlier:

http://postgresql.1045698.n5.nabble.com/High-cost-estimates-when-n-distinct-is-set-td5728596.html

It's clear that there's a practical performance issue here, but less
clear that it's a bug. Nonetheless, thanks for writing it up in so much
detail and chasing it up further - though it'd be nice if you'd
mentioned your earlier post.

I'd love to help, but you've clearly already done a lot of work on this
and I'm not sure I have anything useful to add.

If you don't have any luck, consider asking one of the professional
PostgreSQL consulting firms for their input.

--
Craig Ringer

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

Предыдущее
От: niko.kiirala@mapvision.fi
Дата:
Сообщение: BUG #7619: Query cost estimate appears to not use n_distinct setting
Следующее
От: Sree Krishna Priya Kuppa
Дата:
Сообщение: Posrgresql for Suse linux 64-bit version on OS/390