Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics

Поиск
Список
Период
Сортировка
От Nathan Boley
Тема Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics
Дата
Msg-id 6fa3b6e20806101146m7c699be8qab6d74011435d051@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics
Список pgsql-hackers
>> >> > One more problem with low ndistinct values is that the condition might very well
>> >> > hit no rows at all. But Idea 1 will largely overestimate the number of hits.
>>
>> Thats a good point, but I don't see a clear solution. Maybe we could
>
> I think that MCVs are the solution, right?

Only if they cover the entire range of values in the table.

> A low ndistinct means that those values will likely be MCVs.

Yes, but I don't think thats the point.

If we query on values that aren't in the table, the planner will
always overestimate the expected number of returned rows because it (
implicitly ) assumes that every query will return at least 1 record.


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

Предыдущее
От: Ron Mayer
Дата:
Сообщение: Re: Overhauling GUCS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics