Explain Plan : 1=1 join meaning

Database
Kks
Enthusiast

Explain Plan : 1=1 join meaning

Hi,

I have seen explain plain where join of 1=1 is mentioned
can you tell what it means
4 REPLIES
Junior Contributor

Re: Explain Plan : 1=1 join meaning

This is a dummy join condition, usually for a product join as a result of an unconstraint cross-join within your SQL statement.

Dieter
Enthusiast

Re: Explain Plan : 1=1 join meaning

Hi,

I am not seeing any difference in explain plan if we add 1=1, would you please explain when it gives any sort of benefit. Thanks & Regards,
Enthusiast

Re: Explain Plan : 1=1 join meaning

Dieter's previous answer still holds, 1=1 will always evaluate to true, thus a dummy join condition inserted as the result of an unconstrained full outer join (cross-join)

Cheers

Enthusiast

Re: Explain Plan : 1=1 join meaning

Hi ,

I meant benefit as in performance or any scenario where it will add any value, I executed a query with 1=1 and without haven't notice any change in explain plan,  obviously this is always going to be true :)

Kind Regards,