Re: Removing unneeded self joins

Поиск
Список
Период
Сортировка
От Andrei Lepikhov
Тема Re: Removing unneeded self joins
Дата
Msg-id 8100af4a-d0aa-450d-a09f-541f26b04ac2@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Removing unneeded self joins  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: Removing unneeded self joins  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
On 5/1/24 18:59, Alexander Korotkov wrote:
> I think we probably could forbid SJE for the tables with TABLESAMPLE
> altogether.  Please, check the attached patch.
Your patch looks good to me. I added some comments and test case into 
the join.sql.

One question for me is: Do we anticipate other lateral self-references 
except the TABLESAMPLE case? Looking into the extract_lateral_references 
implementation, I see the only RTE_SUBQUERY case to be afraid of. But we 
pull up subqueries before extracting lateral references. So, if we have 
a reference to a subquery, it means we will not flatten this subquery 
and don't execute SJE. Do we need more code, as you have written in the 
first patch?

-- 
regards,
Andrei Lepikhov
Postgres Professional

Вложения

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

Предыдущее
От: Yugo NAGATA
Дата:
Сообщение: Re: Extend ALTER DEFAULT PRIVILEGES for large objects
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Removing unneeded self joins