Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Join Predicate Question
On Wed, 18 Sep 2002 08:38:26 -0400, dudester <mochaone_at_zdnetmail.com>
wrote:
>Let's say you have the following query:
>
>
>Select
> From Claims C Inner Join
> Members M
>On C.EmpID = M.EmpID
>
>
>I understand what that does. But what if you have the following:
>
>Select
> From Claims C Inner Join
> Members M
>On C.EmpID = M.EmpID
>and C.BirthDt >= '1980-01-01'
>
>
>Is that more efficient that placing the additional predicate in a Where
>clause? I guess I'm trying to find out if there is any difference
>between that statement and this one:
>
>Select
> From Claims C Inner Join
> Members M
>On C.EmpID = M.EmpID
>Where C.BirthDt >= '1980-01-01'
>
Hi Dudester,
It is not more efficient and the result set is the same. The benefit of the latter is that it separates the join clause from the other clauses, which is more readable.
In your simple query, both are quite readable, but consider a join over 6 columns and 20 other where clauses.....then separating the join predicates is definitely more readable.