Hi,

> Currently, IN clauses are very unoptimal in H2 (it uses a linear
> search each time IN clause is evaluated).

Usually the main problem is building and the parsing the statement.

To avoid that, H2 supports a non-standard extension:

PreparedStatement prep = conn.prepareStatement("select * from table(x
int = ?) t inner join test on t.x = test.id");
prep.setObject(1, new Object[] { "1", "2" });
ResultSet rs = prep.executeQuery();

Regards,
Thomas

> I create a Session-bound HashMap and use it for
> fast lookups.

Usually, it's better to use an index.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to