Hi,
we are evaluating ObjectDB 2.5.1_03 in embedded mode.
We have a DB of about 2800 instances of a class that has two java.lang.String members: toExtension and fromExtension. There are other members in the class, but not relevant to the problem.
A query like this causes the java process to start running at 100% CPU (endless loop) and it never recovers:
SELECT r from RecordingMetaData AS r WHERE (((r.toExtension BETWEEN '2010' AND '2099') OR (r.toExtension BETWEEN '2001' AND '2002')) OR ((r.fromExtension BETWEEN '2010' AND '2099') OR (r.fromExtension BETWEEN '2001' AND '2002'))) ORDER BY r.startDate DESC, r.startTime DESC, r.channelNumber DESC
The following query works fine (sub second response):
SELECT r from RecordingMetaData AS r WHERE (((r.toExtension BETWEEN '2010' AND '2099')) OR ((r.fromExtension BETWEEN '2010' AND '2099'))) ORDER BY r.startDate DESC, r.startTime DESC, r.channelNumber DESC
In both cases we limit the result count to the first 50 records with Query.setMaxResults(...).
Any suggestions?
Thank you
Emil