A limitation is that, for each transaction ID, a row will not be returned for the last statement with that transaction id. (Transaction IDs change within a connection after a commit or rollback, if the transaction that just ended modified data.)
The execution duration is the time between the beginning of execution of two successive statements. There are a number of reasons why this time may not be accurate. The duration could include time spent in the application waiting for user input, doing other work, etc. It may also only include a portion of the actual execution time, if the application executes a new statement before draining the previous open ResultSet. StatementDuration can be used to get a rough sense of where the bottlenecks in an application's JDBC code are.
The StatementDuration virtual table has the following columns:
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final String | |
| private BufferedReader | |
| private static final ResultColumnDescriptor[] | |
| private String[] | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private int | |
| private boolean | |
| private Hashtable | |
| private String | |
| private InputStreamReader | |
| private InputStream | |
| private int | |
| private String | |
| private static final ResultSetMetaData | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | StatementDuration()
StatementDuration() accesses the error log in derby.system.home, if set, otherwise it looks in the current directory. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Releases this |
| public ResultSetMetaData | getMetaData()
Overrides org. Implements java. Retrieves the number, types and properties of
this |
| public String | getString(int
the first column is 1, the second is 2, ... columnNumber)Overrides org. Implements java. All columns in StatementDuration VTI have String data types. |
| public boolean | next()
Implements java. Moves the cursor forward one row from its current position. |
| private String | |
| private Timestamp | |
| public boolean | wasNull()
Overrides org. Implements java. Reports whether
the last column read had a value of SQL |
| BEGIN_EXECUTING_STRING | back to summary |
|---|---|
| private static final String BEGIN_EXECUTING_STRING | |
| BEGIN_THREAD_STRING | back to summary |
|---|---|
| private static final String BEGIN_THREAD_STRING | |
| BEGIN_XID_STRING | back to summary |
|---|---|
| private static final String BEGIN_XID_STRING | |
| bufferedReader | back to summary |
|---|---|
| private BufferedReader bufferedReader | |
| columnInfo | back to summary |
|---|---|
| private static final ResultColumnDescriptor[] columnInfo | |
| currentRow | back to summary |
|---|---|
| private String[] currentRow | |
| END_EXECUTING_STRING | back to summary |
|---|---|
| private static final String END_EXECUTING_STRING | |
| END_THREAD_STRING | back to summary |
|---|---|
| private static final String END_THREAD_STRING | |
| END_TIMESTAMP | back to summary |
|---|---|
| private static final String END_TIMESTAMP | |
| END_XID_STRING | back to summary |
|---|---|
| private static final String END_XID_STRING | |
| endTimestampIndex | back to summary |
|---|---|
| private int endTimestampIndex | |
| gotFile | back to summary |
|---|---|
| private boolean gotFile | |
| hashTable | back to summary |
|---|---|
| private Hashtable<String, String[]> hashTable | |
| inputFileName | back to summary |
|---|---|
| private String inputFileName | |
| inputFileStreamReader | back to summary |
|---|---|
| private InputStreamReader inputFileStreamReader | |
| inputStream | back to summary |
|---|---|
| private InputStream inputStream | |
| lccidIndex | back to summary |
|---|---|
| private int lccidIndex | |
| line | back to summary |
|---|---|
| private String line | |
| metadata | back to summary |
|---|---|
| private static final ResultSetMetaData metadata | |
| threadIndex | back to summary |
|---|---|
| private int threadIndex | |
| xidIndex | back to summary |
|---|---|
| private int xidIndex | |
| StatementDuration | back to summary |
|---|---|
| public StatementDuration() throws StandardException StatementDuration() accesses the error log in derby.system.home, if set, otherwise it looks in the current directory. StatementDuration('filename') will access the specified file name. | |
| StatementDuration | back to summary |
|---|---|
| public StatementDuration(String inputFileName) throws StandardException | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Releases this The closing of a
When a Note A
Calling the method
| |
| getMetaData | back to summary |
|---|---|
| public ResultSetMetaData getMetaData() Overrides org. Implements java. Doc from java. Retrieves the number, types and properties of
this
| |
| getString | back to summary |
|---|---|
| public String getString(int columnNumber) throws SQLException Overrides org. Implements java. All columns in StatementDuration VTI have String data types.
| |
| next | back to summary |
|---|---|
| public boolean next() throws SQLException Implements java. Doc from java. Moves the cursor forward one row from its current position.
A
When a call to the If an input stream is open for the current row, a call
to the method
| |
| setupColumn | back to summary |
|---|---|
| private String setupColumn(int columnNumber) throws SQLException | |
| stringToTimestamp | back to summary |
|---|---|
| private Timestamp stringToTimestamp(String raw) throws SQLException | |
| wasNull | back to summary |
|---|---|
| public boolean wasNull() Overrides org. Implements java. Doc from java. Reports whether
the last column read had a value of SQL
| |