Re: Optimization inner join

From: Vitalii Tymchyshyn <vit(at)tym(dot)im>
To: phillip(at)couto(dot)in, Clailson <clailson(dot)dba(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Optimization inner join
Date: 2017-01-19 13:30:33
Message-ID: CABWW-d1VooEQB-KfD-uqQgOVs9jRO6UAtgfvzXx8nvV9UqUKDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi.

In SQL "null == any value" resolves to false, so optimizer can safely skip
nulls from either side if any for the inner join.

Best regards, Vitalii Tymchyshyn

NULL is still a value that may be paired with a NULL in a.a
>
> The only optimization I could see is if the a.a column has NOT NULL
> defined while b.b does not have NOT NULL defined.
>
> Not sure if it is all that common. Curious what if you put b.b IS NOT NULL
> in the WHERE statement?
>
> -----------------
> Phillip Couto
>
>
>
>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Phillip Couto 2017-01-19 13:46:03 Re: Optimization inner join
Previous Message Gustavo Rezende Montesino 2017-01-19 13:23:54 Re: Optimization inner join