Reputation: 5153
I want to know which one of the following - Exists, or In, is faster, and why. I have done lots of Googling, and the consensus looks like that In is more efficient when the outer query has a large data-set and the inner query returns a small one, while Exists is faster for the reverse case. In fact the article at the link Oracle Tips say that it happens because in case of Exists, the outer query is run first, while in case of In, the inner query is run first. If it is so, can anyone explain why?
Upvotes: 0
Views: 85
Reputation: 6534
On the Oracle documentation you have a deep explanation on how to generate and use execution plan Also here you have more information and at the end more links to guide you on the task. But at the end everything will be just spending a couple of hours doing your own research, executing queries and comparing times, execution plans and other known performances issues.
Upvotes: 1