Closed GoogleCodeExporter closed 9 years ago
This is a known problem. There is an optimization for the case "columnA=x or
columnA=y", but it doesn't work in this case because your query uses different
columns and therefore different indexes. I wouldn't call it 'defect', it's just
not implemented.
Original comment by thomas.t...@gmail.com
on 18 Sep 2010 at 3:15
This issue is in the roadmap at http://www.h2database.com/html/roadmap.html -
priority is tracked there.
Original comment by thomas.t...@gmail.com
on 28 Jan 2011 at 7:41
i stumbled over this one too.
also found it mentioned by thomas in 2008:
http://groups.google.com/group/h2-database/browse_thread/thread/7feced8a47eb688e
/fa39f64cd30a5cf9?lnk=gst&q=union#fa39f64cd30a5cf9
the workaround is documented on http://www.h2database.com/html/performance.html
section "Using Multiple Indexes"
moving from mysql to h2, this is quite a surprise and culprit for me. quite
some code to change, and the affected sql statements aren't even easy to find.
"luckily" the performance without union is so bad that the missed cases will
show up at runtime.
i would appreciate this feature. i'm surprised there is not more interest in
this.
Original comment by andrej....@gmail.com
on 22 Dec 2011 at 3:10
here's another duplicate:
http://code.google.com/p/h2database/issues/detail?id=345
Original comment by andrej....@gmail.com
on 22 Dec 2011 at 4:00
Original issue reported on code.google.com by
mbis...@gmail.com
on 10 Sep 2010 at 10:07