Hi Sergi, I think this thread is related to other thread I started some days ago:
https://groups.google.com/forum/#!topic/h2-database/7O4chpOQ8vo I plugged some tables without indexes and I think this brings some confusion to the H2 execution query optimizer because the engine is not aware about the optimized columns (indexed) in order to choose the better sequence to invoke the tables. In my opinion, supporting indexes on the plugged tables would be the right way because it would also prevent no expert users from write heavy queries furthermore it is the standard way for databases in general and the expected way by the H2 engine, of course Anyway thanks!! Pablo. 2015-06-23 13:06 GMT+02:00 Sergi Vladykin <[email protected]>: > Hi! > > Just use left join on foreign key, your conditions in where clause already > will make sure that there will be no extra entries in result set. > > Sergi > > 2015-06-23 13:23 GMT+03:00 Pablo Beltran <[email protected]>: > >> I forgot to mention that *there are not indexes* on any column because >> they are plugged tables.... >> >> On Tuesday, June 23, 2015 at 4:06:18 AM UTC+2, Pablo Beltran wrote: >> >>> Hi, >>> >>> Sometimes the execution order of tables can vary a lot by add-in a >>> simple condition. >>> >>> select * from >>> tableA a >>> INNER JOIN >>> tableB b on b.id=a.id >>> WHERE >>> .. >>> >>> depending on the where conditions tableA is invoked first or not. >>> >>> How to force H2 to use tableA prior tableB always? >>> >>> Thanks! >>> Pablo. >>> >>> >>> -- >> 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 http://groups.google.com/group/h2-database. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "H2 Database" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/h2-database/7O4chpOQ8vo/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- 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 http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
