Thanks for your answer. However I can't change the query, it's generated by 
hibernate which doesn't support the "use index" hint.
I use a lot of queries with a left outer join: the job takes several 
seconds with Postgresql, but one hour with H2.

Le mercredi 19 septembre 2018 15:51:54 UTC+2, Noel Grandin a écrit :
>
>
>
> On 2018/09/19 1:53 PM, Jérémie Brébec wrote: 
> > If I try to execute a query with a left outer join on "PROP", the 
> optimizer didn't return the expected execution plan : 
> > 
>
> You could try using index hints (not much documentation I am afraid), see 
> the syntax here 
>    http://h2database.com/html/grammar.html 
> and search for 
>     USE INDEX 
>
> The optimizer tries a limited number of combinations, and sometimes our 
> cost estimation is not perfect, you could be 
> running into either problem. 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to