Re: INNER JOINS in sql-select.html
От | Tom Lane |
---|---|
Тема | Re: INNER JOINS in sql-select.html |
Дата | |
Msg-id | 17695.1067906301@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: INNER JOINS in sql-select.html ("Henry B. Hotz" <hotz@jpl.nasa.gov>) |
Ответы |
Re: INNER JOINS in sql-select.html
|
Список | pgsql-docs |
"Henry B. Hotz" <hotz@jpl.nasa.gov> writes: > 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. Okay, but that doesn't do the trick --- it implies that CROSS JOIN isn't equivalent to INNER JOIN ON (TRUE), when in fact they are equivalent, both as to result and performance characteristics. The issue at hand is that an explicit "a JOIN b" may not be equivalent to "FROM a, b". I reworded the passage as CROSS JOIN and INNER JOIN produce a simple Cartesian product, the same result as you get from listing the two items at the top level of FROM, but restricted by the join condition (if any). CROSS JOIN is equivalent to INNER JOIN ON (TRUE), that is, no rows are removed by qualification. does that help? regards, tom lane
В списке pgsql-docs по дате отправления: