|The Jtrace driver counts the number of times that JDBC objects of different classes have been opened and closed. This helps to detect if the application forgets to close objects. In the example above, the application failed to close a Statement and a ResultSet object.|
When tracing to a log file, the Connection counters are not used (and will always be zero) since the statistics are collected and displayed for each Connection.
|The trace driver will also count how many times these objects are returned from the driver. Since these classes do not have a close() method, it is not possible to count the number of closes.|
|JDBC calls||The total number of JDBC driver calls.|
|SQL compilations||The number of times an SQL statement was sent to the driver.|
You might be able to reduce this number by using PreparedStatements with parameter markers.
|Counts the number of SQL executions that returned a|
ResultSet (queries) or an update count (updates).
You can compare the number of SQL executions with the number of
SQL compilations. A well-designed application will not recompile the SQL statement for each SQL execution.
|Rows fetched||The total number of rows fetched.|
|Columns fetched||The total number of columns fetched. Together with the|
Rows fetched counter, this gives an indication of the amount
of data the application has retrieved.
|Column NULL checks||Counts the number of times the application checked if the driver returned a NULL value by calling ResultSet.wasNull().|
If this counter is less than the Columns fetched counter,
this indicates that the application fetched some columns without checking for NULL values. This can lead to application errors unless it is known that no NULL values exists in the returned ResultSets
(for example if all corresponding table columns were declared NOT NULL).
|Calls to commit()||The number of calls to Connection.commit().|
If this counter is zero and the Executed updates counter is greater than one, the application could be doing updates of multiple tables without considering the transactional semantics of the operations.
|Calls to rollback()||The number of calls to Connection.rollback().|
|Exceptions from JDBC||The number of SQLExceptions that the traced JDBC driver has thrown.|