-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: show_sql=true, but not all SQL is logged
PostPosted: Tue Jun 13, 2006 6:26 pm 
Newbie

Joined: Tue Jun 13, 2006 6:09 pm
Posts: 2
Location: Englewood Colorado
I have a web application that I have just upgraded from hibernate 2 to hibernate 3. The performance went down with Hibernate 3, so I am trying to compare the SQL generated by each version of Hibernate. My question is this:
I have show_sql set to true in my hibernate.cfg.xml, but I am not getting all the SQL logged. I know this because my program created over 19000 records in one table, but only 4 insert statements show up for this table.

My SQL statements are showing up in the catalina.out file in the tomcat directory, and this file shows all the inserts when I am using Hibernate 3.

Is there any reason a SQL statement would not be logged?

Steve


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 13, 2006 7:43 pm 
Senior
Senior

Joined: Sun Jun 04, 2006 1:58 am
Posts: 136
try setting the logging for

org.hibernate.SQL package

in your log4j.properties

_________________
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 2:18 pm 
Newbie

Joined: Tue Jun 13, 2006 6:09 pm
Posts: 2
Location: Englewood Colorado
I tried enabling net.sf.hibernate.SQL in my logs, and I get the same SQL statements as I got with show_sql=true.

I wonder if hibernate 2 is somehow smart enough to see that a second insert statement is the same as the first, except for the data it is binding, then smart enough to bind the new values and execute without creating another query.

If so, how do I get hibernate 3 to do the same?

Steve


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.