Re: [h2] index doesn't help

2023-01-21 Thread Evgenij Ryazanov
Hello! WHERE boolean and WHERE boolean = TRUE have no difference. The actual problem is usage of OR, H2 is unable to use indexes in such conditions. Take a look on execution plan produced by the EXPLAIN command: SELECT "SEQUENCE", "MEM

Re: [h2] index doesn't help

2023-01-21 Thread Andreas Reichel
Greetings. On Sat, 2023-01-21 at 09:12 -0800, mche...@gmail.com wrote: > where mem or irqRequest <-- very slow I'd try  WHERE mem=true OR irqRequest=true It is possible that mem=irqRequest is not detected or considered (even when it resolved to the same meaning). It is also possible the OR expr

[h2] index doesn't help

2023-01-21 Thread mche...@gmail.com
Hi all This query select sequence,mem,memaddr,memvalue, memRead from data where mem or irqRequest order by sequence where mem <-- fast where irqRequest <-- fast where mem or irqRequest <-- very slow create index mem on data(mem); create index irqRequest on data(irqRequest); create index memAn