Re: 7.4 vs 7.3 ( hash join issue )

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: 7.4 vs 7.3 ( hash join issue )
Дата
Msg-id Pine.LNX.4.44.0409221717010.9559-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: 7.4 vs 7.3 ( hash join issue )  (Greg Stark <gsstark@mit.edu>)
Ответы Re: 7.4 vs 7.3 ( hash join issue )  (Greg Stark <gsstark@mit.edu>)
Список pgsql-performance
On 22 Sep 2004, Greg Stark wrote:

> Actually this looks like it's arguably a bug to me. Why does the hash
> join execute the sequential scan at all? Shouldn't it also like the
> merge join recognize that the other hashed relation is empty and skip
> the sequential scan entirely?

I'm not sure you can classify that as a bug. It's just that he in one of
the plans started with the empty scan and bacause of that didn't need
the other, but with the hash join it started with the table that had 16
rows and then got to the empty one.

While I havn't checked, I assume that if it had started with the empty
table there then it would have skipped the other.

I don't know what criteria is used to select which part to start with when
doing a hash join. Looks like it started with the one that had the highest
estimate of rows here, doing it the other way around might be a good idea
because you in some cases are lucky to find an empty scans and can omit
the other.

The above are just observations of the behaviour, I've not seen the source
at all.

--
/Dennis Björklund


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: 7.4 vs 7.3 ( hash join issue )
Следующее
От: Greg Stark
Дата:
Сообщение: Re: 7.4 vs 7.3 ( hash join issue )