Hi, Join order is tweaked by the query optimizer, so this *probably* won't matter. You could always try it and find out... the console makes it relatively simply to measure performance of different queries.
Regards, Sam Van Oort On Sep 10, 1:38 pm, neutronlabs <[email protected]> wrote: > Hi, > > does it matter for H2 in which order tables are joined? > > MySQL suggests that big tables should be joined first, but I'm not so > sure about that with this query: > > select p.id as pid, p.title as title > from hitlist h > inner join dict d1 on d1.id = h.word_id > inner join hitlist h2 > inner join dict d2 on d2.id = h2.word_id > inner join post p on p.id = h.article_id and p.id = h2.article_id > where d1.word = 'abc' and d2.word = 'xyz' > > the joined view/table/relation get's pretty big at first (as hitlist > is about 4x larger than dict, and 400x larger than post) before it's > shurk again by joining post --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
