X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E40BED1B4E8 for ; Mon, 3 Nov 2003 23:08:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 59964-05 for ; Mon, 3 Nov 2003 19:08:24 -0400 (AST) Received: from eis-msg-012.jpl.nasa.gov (eis-msg-012.jpl.nasa.gov [137.78.160.40]) by svr1.postgresql.org (Postfix) with ESMTP id B63FBD1B575 for ; Mon, 3 Nov 2003 19:08:18 -0400 (AST) Received: from [137.78.212.225] (laphotz.jpl.nasa.gov [137.78.212.225]) by eis-msg-012.jpl.nasa.gov (8.12.10/8.12.10) with ESMTP id hA3N86vS014038; Mon, 3 Nov 2003 15:08:07 -0800 (PST) Mime-Version: 1.0 X-Sender: hotz@mail.jpl.nasa.gov Message-Id: In-Reply-To: <3687.1067554564@sss.pgh.pa.us> References: <1503129.DJSjvup6Wb@weyoun.foo.at> <3687.1067554564@sss.pgh.pa.us> Date: Mon, 3 Nov 2003 15:08:05 -0800 To: Tom Lane , Stefan Weiss From: "Henry B. Hotz" Subject: Re: INNER JOINS in sql-select.html Cc: pgsql-docs@postgresql.org Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/6 X-Sequence-Number: 2083 At 5:56 PM -0500 10/30/03, Tom Lane wrote: >Stefan Weiss writes: >> From : > > | 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