Re: Idea about estimating selectivity for single-column expressions

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Idea about estimating selectivity for single-column expressions
Дата
Msg-id 603c8f070908191204t3cbe136ge0ec0530707a1337@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Idea about estimating selectivity for single-column expressions  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On Wed, Aug 19, 2009 at 3:00 PM, Josh Berkus<josh@agliodbs.com> wrote:
> Tom, Greg, Robert,
>
> Here's my suggestion:
>
> 1. First, estimate the cost of the node with a very pessimistic (50%?)
> selectivity for the calculation.

There is no such thing as a pessimistic selectivity estimation.  Right
now a lot of things use nested loops when they should hash, because we
use 0.5%.  If we changed it to 50%, then we'd have the opposite
problem (and maybe some merge joins where we should have hashing).

Unfortunately, there is no substitute for accurate estimates.  Of
course if the executor had the ability to switch from a nest loop to a
hash join in mid query it would help a great deal, but that's a much
bigger project, I think.

...Robert


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: We should Axe /contrib/start-scripts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: We should Axe /contrib/start-scripts