r/PostgreSQL • u/Koushik5586 • Mar 20 '22
How-To Mastering SQL Query Optimization
https://tvkoushik.medium.com/mastering-sql-query-optimization-622cc6addef2?sk=8e8edbfd5cd370461aa25cfb8d667c12
12
Upvotes
r/PostgreSQL • u/Koushik5586 • Mar 20 '22
2
u/[deleted] Mar 21 '22
I think the recommendation regarding IN vs. EXISTS refers to the situation where the source is a sub-query, not a list of constants.
Because
is functionally the same as
However, I would say that most optimizer will treat them identically.