What we should be doing is using an index scan, which will be just as fast.
Not sure why we're going with a table-scan.
Probably a bug somewhere in the planner logic.

On 2012-04-26 11:45, Steve McLeod wrote:
My understanding is that H2 chooses at most one index to use per SELECT statement. With your OR example, this will therefore require a complete table scan to satisfy one side of the OR statement.

I wonder how other database engines deal with this. Do they use multiple indexes per SELECT? Or do they rewrite the SQL statement to become a UNION statement?



--
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.

Reply via email to