Optimizing Correlated Subqueries with Semi Joins in PostgreSQL and YugabyteDB
Discover this real-world optimization scenario in YugabyteDB (and PostgreSQL), where a correlated subquery is executed inefficiently due to nested loop overhead. This blog details how PostgreSQL internally handles EXISTS clauses and highlights the importance of understanding Semi Join versus SubPlan.