Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: ** SQL WHERE clause order
Thanks Raj and Naveen for your input. However my SQL has a union clause and I want it to be executed whether select_sen_emp_chk_first is Y/N. I tried the ORDER_PREDICATES hint suggested by Yong but do not know how to get it to work. Basically from the explain plan how can we tell when the variables are being checked. :
SELECT emp_id FROM emp
WHERE :select_sen_emp_chk_first = 'Y'
AND dept = :dept
AND salary > :min_sal
UNION
SELECT emp_id FROM emp
WHERE :select_sen_emp_chk_first = 'N'
AND dept != :dept
AND salary < :min_sal
Received on Wed Nov 05 2003 - 14:09:25 CST
![]() |
![]() |