Skip to Main Content

SQL & PL/SQL

Queries have different plan with UNION

User505978 - OracleJun 5 2013 — edited Jun 6 2013
I have 2 query like this:

select * from emp where emp_no=2;

select * from emp where emp_no=3;

when i look at their execution plan seperately, it works fine and no problem but,

when i do this;

select * from emp where emp_no=2
union
select * from emp where emp_no=3;

i see different plan for both.

Is there a way to make use their own plan independently in union statement?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2013
Added on Jun 5 2013
13 comments
11,619 views