Link Details

Link 63088 thumbnail
User 189303 avatar

By j0ke
via jroller.com
Published: Jan 25 2008 / 07:47

Simple test of findAll() SELECT * FROM using Hibernate/Toplink/OpenJPA
  • 9
  • 6
  • 3538
  • 1151

Comments

Add your comment
User 229644 avatar

colmsmyth replied ago:

1 votes Vote down Vote up Reply

Weak performance test:
1) 20 rows in the database!
2) Doesn't state the methodology used to ensure that database caching didn't impact the results

User 189303 avatar

j0ke replied ago:

-1 votes Vote down Vote up Reply

i try with more than 1000 records but with a bad ISP :
Hibernate : Time : 16796ms
OpenJPA : Time : 23000ms
TopLink : Time : 99078ms
YES YES see the TopLink time ok ? :)
,

User 254335 avatar

heartsjava replied ago:

0 votes Vote down Vote up Reply

What does this mean ?? " p.p. When i change ISP (Internet provider) with far far lorse and try the same example the results was ~18 000 ms for Hibernate and ~70 000ms for Toplink YES more than 3 times slower"

Are you running your tests across the internet ?? How is this even close to a real benchmark ??

User 271790 avatar

peter_krogh replied ago:

0 votes Vote down Vote up Reply

I put this same comment on the contents of the Blog
----
Hello,

I suspect that the performance difference you are seeing is because you have lazy One To One (or Many to one) relationships. TopLink Essentials uses byte code weaving to lazily fetch one to one, and many to one relationships. Without weaving turned on, those relationships will be treated as eager, and be read in as the parent is read in.

If this test was being run in a JavaEE 5 container, then the weaving would be used automatically. However, since it is on JavaSE, you will need to turn the weaving on yourself.

Modify your application JVM command line to include:

-javaagent:toplink-essentials-agent.jar

(also ensure that toplink-essentials-agent.jar is on your application classpath).

You can find more information here: http://www.oracle.com/technology/products/ias/toplink/JPA/essentials/toplink-jpa-extensions.html#DynamicWeaving

Peter Krogh
peter.krogh@oracle.com
,
,

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.