[h2] Re: "SELECT .. WHERE ... IN ... OR ... IN" on large tables

2023-02-21 Thread Dhanasekar Rengasamy
Thanks @Evgenij for the suggestion.. Will try the same. Regards, RDS On Friday, 17 February 2023 at 18:20:47 UTC-8 Evgenij Ryazanov wrote: > Hello! > > H2 is unable to optimize such OR conditions when multiple columns are > involved. > > To make your query faster, you need to rewrite it with a

[h2] Re: "SELECT .. WHERE ... IN ... OR ... IN" on large tables

2023-02-17 Thread Evgenij Ryazanov
Hello! H2 is unable to optimize such OR conditions when multiple columns are involved. To make your query faster, you need to rewrite it with a UNION between two inner queries, one with filtration by first column and second with filtration by second one. These inner queries should be able to