Skip to main content
added 11 characters in body
Source Link
nhahtdh
  • 56.9k
  • 15
  • 131
  • 164

ExistWhich one is faster than In it depends on condition when your inner query fetching thousandthe number of rows than exist would be better choice when yourqueries fetched by the inner query fetching few rows you chice should be iN it will be fast that time Exist evulate:

  • When your inner query fetching thousand of rows then EXIST would be better choice
  • When your inner query fetching few rows, then IN will be faster

EXIST evaluate on true or false but inIN compare multiple value when. When you don't know the this record is exist or not, your chice shoulb be Existshould choose EXIST

Exist is faster than In it depends on condition when your inner query fetching thousand of rows than exist would be better choice when your inner query fetching few rows you chice should be iN it will be fast that time Exist evulate on true or false but in compare multiple value when you don't know the this record is exist or not your chice shoulb be Exist

Which one is faster depends on the number of queries fetched by the inner query:

  • When your inner query fetching thousand of rows then EXIST would be better choice
  • When your inner query fetching few rows, then IN will be faster

EXIST evaluate on true or false but IN compare multiple value. When you don't know the record is exist or not, your should choose EXIST

![Exist is faster than In it depends on condition when your inner query fetching thousand of rows than exist would be better choice when your inner query fetching few rows you chice should be iN it will be fast that time Exist evulate on true or false but in compare multiple value when you don't know the this record is exist or not your chice shoulb be Exist][1]

[1]: https://i.sstatic.net/mgegP.jpg Sumair Hussain Exist is faster than In it depends on condition when your inner query fetching thousand of rows than exist would be better choice when your inner query fetching few rows you chice should be iN it will be fast that time Exist evulate on true or false but in compare multiple value when you don't know the this record is exist or not your chice shoulb be Exist

![Exist is faster than In it depends on condition when your inner query fetching thousand of rows than exist would be better choice when your inner query fetching few rows you chice should be iN it will be fast that time Exist evulate on true or false but in compare multiple value when you don't know the this record is exist or not your chice shoulb be Exist][1]

[1]: https://i.sstatic.net/mgegP.jpg Sumair Hussain

Exist is faster than In it depends on condition when your inner query fetching thousand of rows than exist would be better choice when your inner query fetching few rows you chice should be iN it will be fast that time Exist evulate on true or false but in compare multiple value when you don't know the this record is exist or not your chice shoulb be Exist

Source Link

![Exist is faster than In it depends on condition when your inner query fetching thousand of rows than exist would be better choice when your inner query fetching few rows you chice should be iN it will be fast that time Exist evulate on true or false but in compare multiple value when you don't know the this record is exist or not your chice shoulb be Exist][1]

[1]: https://i.sstatic.net/mgegP.jpg Sumair Hussain