Re: [HACKERS] convert EXSITS to inner join gotcha and bug

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: [HACKERS] convert EXSITS to inner join gotcha and bug
Дата
Msg-id ead7502c-a0bf-641e-6ebd-69dddb9165a5@sigaev.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] convert EXSITS to inner join gotcha and bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> Really, the way to fix Teodor's complaint is to recognize that the
> semijoin inner rel is effectively unique against the whole outer rel,
> and then strength-reduce the semijoin to a plain join.  The infrastructure
> we built for unique joins is capable of proving that, we just weren't
> applying it in the right way.
Perfect, it works. Thank you! Second patch reduces time of full query (my 
example was just a small part) from 20 minutes to 20 seconds.

> I'm kind of strongly tempted to apply the second patch; but it would
> be fair to complain that reduce_unique_semijoins() is new development
> and should wait for v11.  Opinions?

Obviously, I'm voting for second patch applied to version 10.

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range
Следующее
От: Ilya Shkuratov
Дата:
Сообщение: [HACKERS] CTE inlining