Suppose I have two tables, t1 and t2 which are identical in layout but which may contain different data.
What\'s the best way to diff these two tables?
Try This,
alter session set "_convert_set_to_join"= true;
The other alternative is to rewrite the SQL query manually [replacing the minus operator with a NOT IN subquery] evidences about 30% improvement in execution time .
select *
from A
where (col1,col2,?) not in
(select col1,col2,? from B)
union all
select * from B
where (col1,col2,?) not in
(select col1,col2,? from A);
I have referred from this post click here