1. Why is EXISTS often faster than IN for large subquery datasets?
- EXISTS short-circuits and returns true as soon as the first matching record is found.
- EXISTS caches results in memory.
- IN does not support primary key index lookup.
- EXISTS automatically writes temp tables.
Hint: EXISTS checks for presence. Once a matching row is located, it stops scanning (short-circuits), making it highly efficient.