Re: [h2] working around differences with h2 PSQL compatibilty

2024-04-07 Thread Andreas Reichel
Greetings! You could use JSQLParser to parse your query and then transpile/rewrite it into the specific dialect. If you would like to give me a Query sample then I will happily assist you with a template. Cheers Andreas On Sun, 2024-04-07 at 08:27 -0700, broccolai wrote: > hi! > > I'm offering

[h2] working around differences with h2 PSQL compatibilty

2024-04-07 Thread broccolai
hi! I'm offering psql and h2 options in my software, as well as using h2 in my tests. But I'm having an issue when trying to store json data. H2 requires "FORMAT JSON" in the value for json but this syntax isn't allowed in PSQL. I'm trying to use the same queries between both which has been

Re: [h2] how much indexes are used for optimization

2024-04-07 Thread Noel Grandin
Run the EXPLAIN command to see which indexes are used for a specific query -- 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

Re: [h2] how much indexes are used for optimization

2024-04-07 Thread 'Christian Buchegger' via H2 Database
"more than one index could be used" in that context means: the optimizer may choose from more than one index but finally has to use only one of theese. To my knowledge the optimizer considers all available indexes an decides based on the cost. In short all indexes are used to calculate the cost

[h2] Re: how much indexes are used for optimization

2024-04-07 Thread Evgenij Ryazanov
Hello! Currently only different primary queries can use different indexes, nested derived tables and subqueries can also use own indexes. SELECT * FROM TEST WHERE NAME = 'A' AND FIRSTNAME = 'B' can use only one index and it needs an index on (NAME, FIRSTNAME, …) or on (FIRSTNAME, NAME, …)