Skip site navigation (1) Skip section navigation (2)

Re: INNER JOINS in sql-select.html

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stefan Weiss <spaceman-4b9f8-20030703(at)ausgehaucht(dot)sensenmann(dot)at>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: INNER JOINS in sql-select.html
Date: 2003-10-30 22:56:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docs
Stefan Weiss <spaceman-4b9f8-20030703(at)ausgehaucht(dot)sensenmann(dot)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

In response to


pgsql-docs by date

Next:From: Josh BerkusDate: 2003-10-31 00:27:25
Subject: Runtime Basics
Previous:From: Bruce MomjianDate: 2003-10-30 18:22:34
Subject: Re: 7.4 compatibility question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group