Re: Implement hook for self-join simplification

Поиск
Список
Период
Сортировка
От Andrey Lepikhov
Тема Re: Implement hook for self-join simplification
Дата
Msg-id 18423a86-f51e-0115-8c0f-fcee7704b135@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Implement hook for self-join simplification  (Leif Harald Karlsen <leifhka@ifi.uio.no>)
Список pgsql-hackers
On 24/6/2022 23:43, Leif Harald Karlsen wrote:
> Thank you for the quick answer, and for the pointer to the patch! This 
> looks like just the thing I need! 
> On a more general note: What would, in general, be the best way to 
> implement such optimizations? Is there a good way to do this as an 
> extension, or is a patch the preferred way?
According to my experience, it depends on your needings.
For example, self-join-removal feature, or my current project - 
flattening of nested subqueries - is much more optimal to implement as a 
patch, because you can do it so early as possible and can generalize 
parts of the core code and thus, reduce size of your code a lot.
But if you want to use your code with many PG versions, even already 
working in production or you make just a research, without immediate 
practical result - your choice is an extension.

-- 
regards,
Andrey Lepikhov
Postgres Professional



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Core dump in range_table_mutator()
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: Future Postgres 15 and Clang 15