-->
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.  [ 4 posts ] 
Author Message
 Post subject: Logging SQL parameter values for perfo analysis ?
PostPosted: Wed Nov 10, 2004 6:02 am 
Newbie

Joined: Fri Sep 17, 2004 3:07 pm
Posts: 14
Hibernate version:2.1.6


In addition to show_sql, could there be (is there?) a setting that would, instead of question marks, log the actual values of the SQL query parameters ?

Values can, sure, be debug-logged explicitly in code, but a globally configurable Hibernate-level switch would come in very handy when locating performance bottlenecks and analyzing their SQL...

You would have to pay special attention to security with this setting on, but I assume most production systems would have show_sql="false" in any case...

//markku


Top
 Profile  
 
 Post subject: Logging Actual SQL Parameters
PostPosted: Tue Dec 14, 2004 1:08 pm 
Newbie

Joined: Tue Dec 14, 2004 12:53 pm
Posts: 2
I, too, am interested in seeing the actual SQL parameters instead of the question mark. I've searched this forum and haven't found that anyone has actually resolved this issue. Is there an answer? Is it already posted? Please post a pointer to the information if it exists.

Thanks,

TR


Top
 Profile  
 
 Post subject: Partial Answer Found
PostPosted: Tue Dec 14, 2004 1:52 pm 
Newbie

Joined: Tue Dec 14, 2004 12:53 pm
Posts: 2
I found a partial answer in this topic: http://forum.hibernate.org/viewtopic.php?t=37

However, this solution also logs all the values returned by the query, which could become a real drain. We have need to log the parameters used in the query, but would rather not have all the values that are returned. Is it possible to do this using the existing logging strategy?

Thanks,

TR


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 14, 2004 4:40 pm 
Expert
Expert

Joined: Thu Jan 29, 2004 2:31 am
Posts: 362
Location: Switzerland, Bern
http://www.p6spy.org/ is a proxy JDBC driver wich logs the full SQL and mutch more if you want.

HTH
Ernst


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.