Re: Removing Inner Joins - Mailing list pgsql-hackers

From Atri Sharma
Subject Re: Removing Inner Joins
Date
Msg-id CAOeZVifR4ba3=j4e+0e03EYzPHPaKXu7yV1DmL4jEyq-Ss9y9w@mail.gmail.com
Whole thread Raw
In response to Re: Removing Inner Joins  (Antonin Houska <antonin.houska@gmail.com>)
Responses Re: Removing Inner Joins
List pgsql-hackers
> Can you please post an example of such a join removal? I mean a query before
> and after the removal. Thanks,

Courtesy Robert Haas:

SELECT foo.x, foo.y, foo.z FROM foo WHERE foo.x = bar.x

Conditions:

1) foo.x is not null.

2) foo (x) is a foreign key referencing bar (x).

We can ignore bar completely in this case i.e. avoid scanning bar.

Regards,

Atri


--
Regards,

Atri
l'apprenant



pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Removing Inner Joins
Next
From: Hannu Krosing
Date:
Subject: Re: Removing Inner Joins