Here is an example SQL that retrieves data from EMPLOYEE table with “emp_id < 710000” and employee’s department code exists in DEPARTMENT table.
select *
from employee
where emp_id < 710000
Here the following are the query plan of this SQL, it takes 34.22 seconds to finish. The query plan is very complicated, although the SQL is quite...
How to Tune SQL with Exists Operator in Certain Environment for Oracle?
select *
from employee
where emp_id < 710000
and exists (select 'x'
from department
where dpt_id = emp_dept)
where dpt_id = emp_dept)
Here the following are the query plan of this SQL, it takes 34.22 seconds to finish. The query plan is very complicated, although the SQL is quite...
How to Tune SQL with Exists Operator in Certain Environment for Oracle?