Hi, Nobody needs to run any additional tests, that would be just a waste of time. It is clear that the H2 database, as well as at least Apache Derby, don't use two indexes for the given query. Except if you use UNION. This is documented already, under http://h2database.com/html/performance.html#storage_and_indexes
Therefore, I suggest to use UNION in this case. This will not only help H2, but also other databases. Regards, Thomas On Mon, May 7, 2012 at 10:09 AM, Thomas Egense <[email protected]> wrote: > Thanks for your time analyzing the DB file. > > I understand your performance tips and index over multiple fields. > > But they are minor compared to the *100+ performance factor I > experience using the OR instead of using two SELECTS and UNION between > them. > Can you confirm you experienced this too? Even with the smaller DB > file I gave you it still still a factor *100+ in difference. > > From, > Thomas > > > > -- > 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. > -- 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.
