Re: HashJoin order, hash the large or small table? Postgres likes to hash the big one, why?

Поиск
Список
Период
Сортировка
От pasman pasmański
Тема Re: HashJoin order, hash the large or small table? Postgres likes to hash the big one, why?
Дата
Msg-id BANLkTinVrHwVu_8-uqqc8U8zMGU6ihrRBg@mail.gmail.com
обсуждение исходный текст
Список pgsql-performance
hi.

>I think you're missing the point, which is that all the hash work is
>just pure overhead in such a case (and it is most definitely not
>zero-cost overhead).  You might as well just do a nestloop join.
>Hashing is only beneficial to the extent that it allows a smaller subset
>of the inner relation to be compared to each outer-relation tuple.
>So I think biasing against skew-distributed inner relations is entirely
>appropriate.


Scanning smaller relation first is better with cursors.
First rows from query are returned faster in this case.
Maybe add this optimization for cursors only?



------------
pasman

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

Предыдущее
От: Václav Ovsík
Дата:
Сообщение: Re: poor execution plan because column dependence
Следующее
От: Mark Williams
Дата:
Сообщение: Bad Query Plan with Range Query