Hi
Thanks for the updated test case.
I've looked into this, and the situation is thusly:
We have special case optimised code for handling "IN (1,2,3)" queries.
Unfortunately, for "IN (?,?,?)" queries the optimised code does not get
used because we at the point in time we run the optimiser, the optimiser
sees the prepared-statement-parameters and bails out.
Running the optimiser on a PreparedStatement kind of defeats the point
of a PreparedStatement, which is to minimise per-execution setup cost.
It might be possible to teach the code in
org.h2.expression.ConditionIn#optimize to handle this case, but I'm
loathe to add that much complexity for corner cases like this.
I'll think about it some more.
Regards, Noel.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.