Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Hibernate Query] Slow performance with Oracle as compared to MySQL

 
Abhijit Salunkhe
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pros,

We are using Hibernate for the persistent layer of our Java based web application.It has been observed that the application response time is significantly slow when using Oracle as compared to using MySQL.

For Example.
Particular transaction (used as a abstract term) say transactionX takes approximately 18 Sec with MySQL. Same transationX when fired using Oracle as a database completes in approximately 55 Sec.

Is there any known issue with hibernate which must be causing this performance issue with Oracle?

We fired generated SQL statements directly from SQL editor. Our initial investigation directs towards use of joins, but not sure if this is the real culprit.

Also, In configurations we found one difference,

For MySQL
For Oracle

Thanks in advance,
Abhijit Salunkhe
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many factors can lead to this, and it is not necessarily Hibernate that is the cause.

Main things I would ask is what is the explain plan you get from Oracle, that would tell you a lot about the query.

Maybe you don't have indexes in Oracle that you had in MySQL. Or that you had no indexes in MySQL, that you now need in Oracle. Ask your Oracle DBA to analyze your query.

Are you eager loading too much data?

There are many possibilities here, but I recommend what I wrote above first.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic