What is the diffrence between IN and EXISTS.which one is
faster.

Answers were Sorted based on User's Feedback



What is the diffrence between IN and EXISTS.which one is faster...

Answer / neha

In the in clause, the inner query is executed first, hence if the inner query return less data than the outer query, then use IN clause, in the other scenario, user exists clause.

Also, in the exists clause the inner query always reference outer query's table, which may or may not be the case with in IN clause.

Is This Answer Correct ?    4 Yes 1 No

What is the diffrence between IN and EXISTS.which one is faster...

Answer / rashmi

> we use IN gives better performance when there is less number of record in a table (up to 999 records), But for large number records EXIST give better performance.
>In may or may not depends a sub query all time, But EXIST always depend on a sub query.

Is This Answer Correct ?    2 Yes 1 No

What is the diffrence between IN and EXISTS.which one is faster...

Answer / manoranjan sethy

Exist operator always faster then In operator.
because assume that we gave value like in(10) then what is does? it will search my entire table and wherever 10 is found it will return as output.
but in exist operator if 10 found then optimizer will stop the searching process that is how exist gives more performance.

ii) In operator all ways conduct pattern search process but exist conduction boolean state of search process.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is the process of copying data from table a to table b?

0 Answers  


Can we enter data in a table in design view?

0 Answers  


When do we use triggers?

0 Answers  


wht is the difference between truncat,drop in sqlserver wht is the difference between function and stored procedure

3 Answers   Apollo,


What is synchronized subquery?

0 Answers  






How do I enable sql encryption?

0 Answers  


what are the differences between char and nchar? : Sql dba

0 Answers  


what is the difference between varray and table data type..please expalain with some examples... under what situation you will go for varray..instead of index by table...

1 Answers   HCL, Satyam,


what are the 'mysql' command line options? : Sql dba

0 Answers  


what is the difference between join and union? : Sql dba

0 Answers  


Two Methods of retrieving SQL?

7 Answers   Atiric Software, Microsoft, Oracle, TCS, Wipro,


Explain the components of sql?

0 Answers  


Categories