[JDBC-1] Provide option to return SQL generated / execution stats Created: 08/May/11 Updated: 26/Aug/15 Resolved: 26/Aug/15
|Reporter:||Sean Corfield||Assignee:||Sean Corfield|
Shantanu: Provide a mechanism to show the SQL being executed (configurable, so that it can be turned off)
Sean: Good idea. Even better, a way to access statistics about the prepared statement after execution - timing etc?
Shantanu: Yes, that would be an add-on value to show how are the queries performing.
|Comment by Sean Corfield [ 15/Sep/13 4:21 PM ]|
|Comment by Sean Corfield [ 16/Jan/15 1:17 PM ]|
Sounds like not all drivers can support this but PreparedStatement.toString() returns the generated SQL for some databases: http://stackoverflow.com/questions/2683214/get-query-from-java-sql-preparedstatement
|Comment by Sean Corfield [ 26/Aug/15 9:02 PM ]|
Since there is no portable way to do this and the output of (.toString stmt) differs across drivers such that extracting the generated SQL / parameters in any meaningful way is difficult, I'm going to decline this one.