I have couple of questions about Hibernate.
(1) How to make Hibernate run fast?
The application (Java accessing Oracle database through Hibernate) is taking long time with hibernate to come up. When i turn off the debug output from Hibernate (<property name="show_sql">false</property>), it didn't help that much. And i think, as the data in database grows, the hibernate application is going to take more time. Isn't it right? Please let me know how to make it fast?
(2) How debug to hibernate SQL?
I set the property ((<property name="show_sql">true</property>) to "true" to see the SQL executed by hibernate. I see number of SQL statements with ? mark at the end as shown below. If it breaks (assume with following sql), then it's really difficult to find out the value for ? mark. Is there any way to find out the actual SQL passed to database from Hibernate? It can save a lots of debugging time if i know which value the ? mark is having when Hibernate couldn't execute SQL and throws exception.
-----------------------------------
select instrument0_.col as INS1_0_, from table instrument0_ where instrument0_.col=?
------------------------------
Thanks in advance
Prashant.
|