Hibernate query performance tuning is a very big problem while coading.Tuning hibernate performance can be made easier by setting these simple properties in configuration file(default:hibernate.cfg.xml) or hibernate.properties
1)hibernate.show_sql ---- true/false ---- Writes all SQL statements to console. This is an alternative to setting the log category org.hibernate.SQL to debug.
2)hibernate.format_sql ----true/false---- Pretty print the SQL in the log and console.
3)hibernate.generate_statistics ----true/false---- If enabled, Hibernate will collect statistics useful for performance tuning.
4)hibernate.use_sql_comments ----true/false---- If turned on, Hibernate will generate comments inside the SQL, for easier debugging, defaults to false.
Hibernate Performance Tuning Document.
This document is very helpful for increasing hibernate performance.
No comments:
Post a Comment