<< Back to previous view

[JDBC-1] Provide option to return SQL generated / execution stats Created: 08/May/11  Updated: 26/Aug/15  Resolved: 26/Aug/15

Status: Resolved
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Sean Corfield Assignee: Sean Corfield
Resolution: Declined Votes: 0
Labels: None


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 ]

Post 0.3.0

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.

Generated at Tue Oct 06 13:38:19 CDT 2015 using JIRA 4.4#649-r158309.