openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: H2 poor performance?
Date Tue, 24 Jan 2012 14:54:40 GMT
First of all, Congratulations on your migration from Hibernate to OpenJPA.
 I'm glad to hear that things worked out well for you during this effort.

As far as H2 performance...  My guess is that the H2 Dictionary may not
have been kept up to date with improvements to H2 features and SQL
improvements.  These dictionaries have been maintained as needs arise and
as expertise provides input and feedback.  For example, our DB2 customers
provide input for the DB2 dictionary, Oracle users provide input for the
Oracle dictionary, etc.  I looked back on my notes and I don't see an
expert identified for H2.  Would you like to provide that service?  :-)

Since the performance of MySQL and Postgres seem to be acceptable, I would
assume that the deficiencies are probably localized to the dictionary.  I
would start by turning on Trace while running your test bucket.  The full
Trace output will show the timings for executing the various SQL.  Maybe
you'll find SQL being generated that is not efficient for H2.  You could
also review the H2 Dictionary and see if some of the basic properties may
not be set correctly for H2.  Maybe comparing MySQL and/or Postgres
dictionaries and trace output with H2's.

Good luck,
Kevin

2012/1/24 Francesco Chicchiriccò <ilgrosso@apache.org>

> Hi all,
> I am currently facing some strange behavior with in-memory H2.
>
> In my project - Syncope Open Source IdM [1] - we recently moved from
> Hibernate to OpenJPA: everything is now working and I can safely say
> that the porting is functionally complete.
>
> Our source code does some integration tests with Tomcat 7 and an
> in-memory H2 instance: unfortunately H2 performs really bad in such
> circumstances. Only consider that all tests take 128 secs to run, while
> same tests take only 96 secs with PostgreSQL and 77 with MySQL.
>
> When running the same test suite against last Hibernate-based build, it
> turns out instead that H2 is faster than MySQL and PostgreSQL (as I
> would expect given the small test dataset).
>
> Is there anything special I should take care of when using in-memory H2?
>
> TIA.
> Regards.
>
> [1] http://www.syncope-idm.org
>
> --
> Francesco Chicchiriccò
>
> Apache Cocoon Committer and PMC Member
> http://people.apache.org/~ilgrosso/
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message