From: | Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru> |
---|---|
To: | Leif Harald Karlsen <leifhka(at)ifi(dot)uio(dot)no>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Implement hook for self-join simplification |
Date: | 2022-06-25 05:42:46 |
Message-ID: | 18423a86-f51e-0115-8c0f-fcee7704b135@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2022-06-25 06:24:30 | Re: Future Postgres 15 and Clang 15 |
Previous Message | Tom Lane | 2022-06-25 03:39:09 | Re: Core dump in range_table_mutator() |