Re: Broken selectivity with special inet operators

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Broken selectivity with special inet operators
Дата
Msg-id 5458.1316652483@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Broken selectivity with special inet operators  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Broken selectivity with special inet operators
Список pgsql-bugs
Josh Berkus <josh@agliodbs.com> writes:
>> If you mean the indexscan optimization, we do know how to estimate the
>> cost of the indexscans, because that depends mostly on the behavior of
>> the added < or > condition(s).  This does not imply knowing how to
>> estimate the behavior of >>= itself.

> If we can estimate the cost of the indexscan, why can't we estimate the
> rowcount?

Because the estimated rowcount is derived long before we consider whether
to use an indexscan at all, and indeed must be computable whether the
table has any related index or not.  The special-indexscan-qual code is
*not* a substitute for providing a selectivity estimator.

It's possible that we could build simple estimators for these operators
that just turn the problem into a range estimation and then pass it off
to somewhere else, but nobody has tried.

            regards, tom lane

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Broken selectivity with special inet operators
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Broken selectivity with special inet operators