Ludwig Lim <[EMAIL PROTECTED]> writes:
>Is there way of rewritting :
>SELECT a.status,
>employee_id
>FROM permission a LEFT JOIN
> ( SELECT * FROM employee WHERE employee_id
> =5) as b ON (a.status = b.status)
>WHERE status='test'
> into a query that has
On Fri, Jun 27, 2003 at 23:16:18 -0700,
Ludwig Lim <[EMAIL PROTECTED]> wrote:
>
>Is there way of rewritting :
>SELECT a.status,
>employee_id
>FROM permission a LEFT JOIN
> ( SELECT * FROM employee WHERE employee_id
> =5) as b ON (a.status = b.status)
>WH
--- Tom Lane <[EMAIL PROTECTED]> wrote:
> Ludwig Lim <[EMAIL PROTECTED]> writes:
> > 1) Is the ON clause of an OUTER JOIN always
> > evaluated first before the WHERE clause?
>
> No; the planner will do whatever it thinks is the
> most efficient way
> (assuming it can prove that the reordering i
Ludwig Lim <[EMAIL PROTECTED]> writes:
> 1) Is the ON clause of an OUTER JOIN always
> evaluated first before the WHERE clause?
No; the planner will do whatever it thinks is the most efficient way
(assuming it can prove that the reordering it wants to do won't change
the query result).
> Is t
Hi:
1) Is the ON clause of an OUTER JOIN always
evaluated first before the WHERE clause?
2) Given the ff SQL statement :
SELECT employee_id,
a.status as status
FROM permissions a LEFT JOIN
(select * from employee where employee_id = 3)
as b on (a.status=b.status)
WH