What is the difference between IN and Exists in Oracle?
Answer Posted / pankaj
In sql server,
WHEN YOU USE 'IN', WHILE CHECKING FOR WHERE CONDITION SQL SERVER ENGINE DOES WHOLE TABLE SCAN. IF YOU USE 'EXISTS' AS SOON AS ENGINE FINDS THE REQUIRED ROW IT WILL STOP EXECUTING QUERY AND GOING FURTHER SCANNING TABLE.
In Oracle,
EXISTS is very faster than IN (when the subquery results is very large)
IN is faster than EXISTS (when the subquery results is very small)
In Example -
select ename from emp
where mgr in (select empno from emp where ename = 'KING');
Exists Example -
Select ename from emp a where exists ( select 0/null from emp b where a.mgr=b.empno and ename='KING')
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are the different types of repositories created using informatica?
What is the sequence generator transformation in informatica?
what is the size of your data warehousing?
is it possible to index the data in cache of lkp transformation ?
Can we create a node as a gateway node and the same node can be assigned to a grid?
Differentiate between source qualifier and filter transformation?
What is Index Caches size?
explain one complex mapping with logic? sales project?
What is meant by lookup transformation? Explain the types of lookup transformation?
Hi, I want to do Informatica Designer certification. Can anyone help me by providing the details on this. Thanks in advance. Regards, Arnab
Target increases every day even though no new record was inserted
What is lookup change?
What is a grid in Informatica?
What are the various types of transformation?
how to construct simple biogas digerter? please show me detail drawing and specification of simple biogas construction?