Fast Object Database for Java - with JPA/JDO support

Difference performance in ObjectDB Explorer and in java project



I am learning ObjectDB and i noticed that the queries that are executed in  ObjectDB Explorer are faster (about 5 ms) than queries in my project (~400 ms).

Here is my JPQL query : 

SELECT p FROM Point p WHERE p.x=0

I am using Point entity class from tutorial, but with Indexed "x" field and database contains 999,999 points with random coordinates.

Am i missing something or it is a feature of explorer?

P.S. Two source files are attached.


Queries are executed in the Explorer in a special lazy mode, which is faster in returning the results, but requires further round-trips to fetch related data.

You can try it also from your program:

    query.setHint("objectdb.result-fetch", "LAZY");
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Thank you, is where any other useful hints for object db? Performance is better, but still not the same 1000 ms in my project and about 300 ms in explorer


See this manual page regarding the query hints.

If your classes are not enhanced then try enhancing them.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Appreciate your help

Post Reply