Hi,

I'm really impressed by the your support. Thank you for this.

@Noel: If it's to hard to implement then don't think to long about it. As 
you said it's a special case (although I like it to use the jOOQ Function 
`select * from something where x in (<Collection of Ids>)', but it's not to 
hard to make a workaround (Lukas suggested 
http://www.jooq.org/doc/3.1/manual/sql-building/bind-values/inlined-parameters/
).
But please add this special case (indexed parameters in IN statements) as 
additional information to your h2-documentation.


Am Dienstag, 8. Oktober 2013 11:25:30 UTC+2 schrieb Noel Grandin:
>
> 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.

Reply via email to