3 ms·
Did you compare the execution plans of both queries? Without doing that, it's hard to know why the planner did what it did. Maybe statistics were off and it was
by Tostino 10y ago
Did you compare the execution plans of both queries? Without doing that, it's hard to know why the planner did what it did. Maybe statistics were off and it was choosing a worse plan for the left join because it thought it'd be faster, where the sub-select it was forced into what should have been an inferior plan (if statistics were correct), which in reality was faster.
- gigatexal 10y agoyes I, too, would like to see more on this. I am skeptical that doing sub queries is faster than joins