pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Henry B. Hotz <hotz@jpl.nasa.gov>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Stefan Weiss <spaceman-4b9f8-20030703@ausgehaucht.sensenmann.at>
Cc: pgsql-docs@postgresql.org
Subject: Re: INNER JOINS in sql-select.html
Date: Mon, 3 Nov 2003 15:08:05 -0800
Message-ID: <p05210602bbcc8fb0d68c@[137.78.212.225]> (raw)
In-Reply-To: <3687.1067554564@sss.pgh.pa.us>
References: <1503129.DJSjvup6Wb@weyoun.foo.at>
	<3687.1067554564@sss.pgh.pa.us>

At 5:56 PM -0500 10/30/03, Tom Lane wrote:
>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.

You can imply the issue without obfuscating things.  How about:

>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 yields the same results as INNER JOIN ON (TRUE), that is, 
>no rows are removed by qualification.

-- 
The opinions expressed in this message are mine,
not those of Caltech, JPL, NASA, or the US Government.
Henry.B.Hotz@jpl.nasa.gov, or hbhotz@oxy.edu



view thread (5+ messages)  latest in thread

Message-ID: <p05210602bbcc8fb0d68c@[137.78.212.225]>
Permalink:  ../p05210602bbcc8fb0d68c@%5B137.78.212.225%5D/
Also on:    postgresql.org/message-id/p05210602bbcc8fb0d68c@[137.78.212.225]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: hotz@jpl.nasa.gov, tgl@sss.pgh.pa.us, spaceman-4b9f8-20030703@ausgehaucht.sensenmann.at
  Subject: Re: INNER JOINS in sql-select.html
  In-Reply-To: <p05210602bbcc8fb0d68c@[137.78.212.225]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox