Re: [h2] Request for advice

2023-04-26 Thread Silvio
That is actually a very good idea. We never considered using a UNION here. Would H2 be able to use a different index for multiple queries inside a single UNION? I was under the impression H2 always uses one index for a query but that may no longer be the case. If that is true this could

Re: [h2] Request for advice

2023-04-26 Thread Silvio
Unfortunately we are talking about a production situation and using a h2-version that is not officially released (for whatever that means) is something we are not allowed to do. I would be very eager to check what happens with any new upcoming release. A join would naturally work but I would

Re: [h2] Request for advice

2023-04-26 Thread Noel Grandin
On 4/26/2023 11:03 AM, Silvio wrote: We have some heavy queries that involve selecting records from a base cached table A (~100K records) that satisfy a quite a number of conditions expressed as A.PK [NOT] IN (...) You could also express those as A.PK NOT IN ( SubNotCondition1 UNION

Re: [h2] Request for advice

2023-04-26 Thread Andreas Reichel
Greetings. As far as I understand it, Evgenji just committed a change regarding index use in `IN()` clause. Maybe try the very lastest GIT Master first. Also I wonder, why you would not use a JOIN instead of a IN() when you have a list of FK_A from C: select * from a inner join c on a.pk =