Hi all.
I came across this from Oracle: https://oracle-base.com/articles/misc/join-elimination#basic-join-elimination
Needless to say, this would be very cool to have in PG:-)
It seems this has been discussed before [1], [2], [3], and the consesus at the time was that the proposted implementation introduced way too much planning-overhead to be worth it. Given that other RDBMS-vendors provides this, and it's on the "Cool feactures other have that we don't"-list [4], is anyone interessted in working on improving this?
1. Patch to support SEMI and ANTI join removal:
https://www.postgresql.org/message-id/flat/CAApHDvpCBEfuc5tD=vniepAv0pU5m=q=fOQZcOdMHeei7OQPgQ@mail.gmail.com#CAApHDvpCBEfuc5tD=vniepAv0pU5m=q=fOQZcOdMHeei7OQPgQ@mail.gmail.com
2. Patch to Remove INNER JOINs:
https://www.postgresql.org/message-id/CAApHDvp4SsyQq5r%2Bj5iUA1rF1SuWGD5QrhoVLqOqOxVXe%3DNjxw%40mail.gmail.com
3. Removing INNER JOINs
http://www.postgresql-archive.org/Removing-INNER-JOINs-td5828650i40.html
4. https://blog.jooq.org/2017/09/28/10-cool-sql-optimisations-that-do-not-depend-on-the-cost-model/#top3
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963