Re: Sequential Scans On Complex Query With UNION - see why this fails
От | Michael Glaesemann |
---|---|
Тема | Re: Sequential Scans On Complex Query With UNION - see why this fails |
Дата | |
Msg-id | 08E5AFE4-8B58-4D91-82A1-501419839BE4@myrealbox.com обсуждение исходный текст |
Ответ на | Re: Sequential Scans On Complex Query With UNION - see why this fails (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Sequential Scans On Complex Query With UNION - see why this fails
|
Список | pgsql-novice |
On Jan 12, 2006, at 12:21 , Tom Lane wrote: > I think what's happening is that the parser implicitly parenthesizes > like this: > > from ((a join b on a.x=b.y) join c on b.y=c.z) Any idea off hand if the SQL spec has anything to say on the subject? I haven't dug into my local version of the final draft to see. >> I believe both join conditions and >> restrictions are rewritten as they'd appear in the WHERE clause, so >> you *could* put them all in the WHERE clause. > > Again, this is true for inner joins but very much not the case if > any outer joins are involved. Thanks for the clarification, Tom. While I was writing I thought that OUTER JOIN was an exception, but I neglected to look into it or include my thoughts. Michael Glaesemann grzm myrealbox com
В списке pgsql-novice по дате отправления: