On Tue, 5 Mar 2019 08:13:32 +
Hick Gunter wrote:
> The second statement uses a *correlated* subquery as the RHS of an IN
> expression. The QP needs to actually run this query for every record
> of t1 that matches the condition t1.c == 1.
I'm not sure what you mean be "needs", above. If
Both statements generate the same result set, but they are neither equivalent
nor equally fast.
The first statement uses a *constant* subquery as the RHS of an IN expression.
The QP is free to materialize this query (i.e. run it once and keep the results
in an "ephemeral" table with an index
2 matches
Mail list logo