| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> SELECT statement efficiency question
I have the following two select statements in some code I've been looking
at. I don't have
access to a computer with Oracle on it currently so I can't determine this
myself.
Both selects do the same thing. The function in the second version simply
checks the
condition what is in the first and send back a 'Y' or 'N' whereas the first
has the
check in the where clause itself.
My question is this: is any one of the two selects more efficient (or less
efficient)
than the other?
SELECT a.mbr_dob,
a.mbr_first_nm,
a.mbr_gender,
b.mbr_key,
a.mbr_last_nm,
b.mbr_sys_key,
b.mbr_updated_dt,
a.mbr_x_fst_nm,
a.mbr_x_lst_nm,
a.person_id,
a.z_person_id
FROM mbr_person a,
mbr_system b
WHERE a.person_id = b.person_id
a.mbr_last_nm NOT IN ( 'DATA','CORRECTION' )
AND a.mbr_first_nm NOT IN ( 'DATA','CORRECTION' )
);
SELECT a.mbr_dob,
a.mbr_first_nm,
a.mbr_gender,
b.mbr_key,
a.mbr_last_nm,
b.mbr_sys_key,
b.mbr_updated_dt,
a.mbr_x_fst_nm,
a.mbr_x_lst_nm,
a.person_id,
a.z_person_id
FROM mbr_person a,
mbr_system b
WHERE a.person_id = b.person_id
![]() |
![]() |