Turn off transitive joins

Started by Gourav Kumarabout 8 years ago3 messages
#1Gourav Kumar
gourav1905@gmail.com

Hi all,

Is there some way by which I can tell postgresql to not to consider
transitive joins while considering join pairs.

I.e. Let's say a query has two join predicates one between A & B relations
and the other between B and C relations.

While constructing the DP to find the best join order, the Optimizer also
consider join between A & C, which can be thought of as a transitive join.

Is their some way to turn this off or tell postgresql to not to consider
these type of joins ?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gourav Kumar (#1)
Re: Turn off transitive joins

Gourav Kumar <gourav1905@gmail.com> writes:

Is there some way by which I can tell postgresql to not to consider
transitive joins while considering join pairs.

No ... and you have presented no reason whatever why we should consider
adding such a capability.

Maybe you should be trying to construct your join graph someplace
earlier, before the optimizer processes the join quals.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Gourav Kumar
gourav1905@gmail.com
In reply to: Tom Lane (#2)
Re: Turn off transitive joins

I don't think there is any need to add any such capability in postgresql,
but I need it for my work.

I need the join qualifiers.
On 15-Oct-2017 1:37 AM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:

Show quoted text

Gourav Kumar <gourav1905@gmail.com> writes:

Is there some way by which I can tell postgresql to not to consider
transitive joins while considering join pairs.

No ... and you have presented no reason whatever why we should consider
adding such a capability.

Maybe you should be trying to construct your join graph someplace
earlier, before the optimizer processes the join quals.

regards, tom lane