• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate Tips: Performance  RSS feed

 
Mark Connell
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...thanks for doing the post.

2 questions;

1. What would you see is the most common hibernate performance tip not taken advantage of that you think developers should know about?
2. DBA often have conflicts with hibernate queries in oracle databases when tryin to optimize and pin plans due to the hibernate generated hql executed. Any suggestions tips around assisting with DBA tuning developers might not be aware of?

 
Thorben Janssen
Author & Course Creator
Ranch Hand
Posts: 92
5
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think that more developers should activate Hibernate's Statistics component during development. See: http://www.thoughts-on-java.org/how-to-activate-hibernate-statistics-to-analyze-performance-issues/
It helps to understand how Hibernate interacts with the database and allows you to find several performance issues before you deploy them to production.

When you DBA provides you with an optimized query, you can execute it as a native SQL query. That's often the best approach if Hibernate's generated queries don't perform well. You can read more about native queries here: http://www.thoughts-on-java.org/jpa-native-queries/

The book also contains several tips about native SQL queries and how to map the returned Object[] to entities or POJOs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!