Hi,

I put in a logger via a user defined function, and it seems to in fact 
re-execute the IN sub-query for every matching outer row.  Am I 
interpreting this correctly?  Any work around?

-Adam

On Sunday, September 18, 2016 at 8:25:20 PM UTC-4, Adam McMahon wrote:
>
> Hi,
>
> When a SELECT is used as a sub-query of an IN, is the sub-query only 
> executed once?  Consider the following made up query that finds all staff 
> members who are in the state of California who are also a student majoring 
> in Computer Science.
>
> select * from students where major='CSC' and id IN (select id from staff 
> where state='CA')
>
> Does H2 first execute the sub-query, and the the outer one?  Or does it 
> execute the sub-query at every row match from the outer query?  I am using 
> version  1.3.176  with page store (if that matters).
>
> Thanks,
>
> -Adam
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to