Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Join Predicate Question

Re: Join Predicate Question

From: dudester <mochaone_at_zdnetmail.com>
Date: Wed, 18 Sep 2002 16:59:25 -0400
Message-ID: <3D88E92D.7060704@zdnetmail.com>


kennethkoenraadt_at_no-spam.hotmail.com wrote:

> 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.
> 
> 
> - Kenneth Koenraadt


Ken, thanks for the response. I thought I noticed an improvement when moving my where predicates to join precicates. But I didn't have timeto test. I'll do some more digging around later this week. Received on Wed Sep 18 2002 - 15:59:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US