Re: INNER JOINS in sql-select.html - Mailing list pgsql-docs

From Tom Lane
Subject Re: INNER JOINS in sql-select.html
Date
Msg-id 3687.1067554564@sss.pgh.pa.us
Whole thread Raw
In response to INNER JOINS in sql-select.html  (Stefan Weiss <spaceman-4b9f8-20030703@ausgehaucht.sensenmann.at>)
Responses Re: INNER JOINS in sql-select.html
List pgsql-docs
Stefan Weiss <spaceman-4b9f8-20030703@ausgehaucht.sensenmann.at> writes:
> From <doc/html/sql-select.html>:
> | A CROSS JOIN or INNER JOIN is a simple Cartesian product, the same
> | as you get from listing the two items at the top level of FROM. CROSS
> | JOIN is equivalent to INNER JOIN ON (TRUE), that is, no rows are
> | removed by qualification.

> I thought that by using the second form, you would be able to do
> 'explicit' joins, effectivly telling the planner in which order to
> join multiple tables (in case you have to join 10+ tables)?

They are semantically equivalent, but not necessarily the same from a
performance point of view.  The potential performance issues are covered
elsewhere; I think it would just obfuscate matters to try to include
that topic here.

            regards, tom lane

pgsql-docs by date:

Previous
From: Stefan Weiss
Date:
Subject: INNER JOINS in sql-select.html
Next
From: Josh Berkus
Date:
Subject: Runtime Basics