Neoview JDBC Type 4 Driver Programmer's Reference (R2.2, R2.3, R2.4, R2.5)

Thread-Safe Database Access
In the Type 4 driver, API layer classes are implemented as instance-specific objects to ensure
thread safety:
HPT4DataSource.getConnection() is implemented as a synchronized method to ensure
thread safety in getting a connection.
Once a connection is made, the Connection object is instance-specific.
If multiple statements are run on different threads in a single connection, statement objects
are serialized to prevent data corruption.
"Update ... Where Current of" Operations
The fetch size on a ResultSet must be 1 when performing an update ... where current
of cursor SQL statement.
If the value of the fetch size is greater than 1, the result of the update ... where current
of operation might be one of the following:
An incorrect row might be updated based on the actual cursor position.
An SQLException might occur because the cursor being updated might have already been
closed.
NOTE: By default, the fetch size is 1.
The following is an example of setting a result set's fetch size to 1 and executing an update ...
where current of cursor SQL statement.
ResultSet rs;
...
rs.setFetchSize(1);
String st1 = rs.getCursorName();
Statement stmt2 = connection.createStatement( ResultSet.TYPE_FORWARD_ONLY
, ResultSet.CONCUR_UPDATABLE );
stmt2.executeUpdate("UPDATE cat2.sch2.table1
set j = 'update row' WHERE CURRENT OF " + st1);
INFOSTATS Command for Obtaining Query Costs
The INFOSTATS command reports the roll-up costs of a particular query. INFOSTATS is a
pass-through command that collects statistics for a prepared statement. Statistics are returned
to the JDBC application as a result set as soon as the prepare is finished. The result set has these
columns:
DescriptionColumn
Query ID (SQL_CHAR)
An estimate of the number of seconds of processor time it might take to execute
the instructions for this query. A value of 1.0 is 1 second.
CPUTime (SQL_DOUBLE)
An estimate of the number of seconds of I/O time (seeks plus data transfer) to
perform the I/O for this query.
IOTime (SQL_DOUBLE)
An estimate of the number of seconds it takes for the messaging for this query.
The estimate includes the time for the number of local and remote messages and
the amount of data sent.
MsgTime (SQL_DOUBLE)
An estimate of the maximum number of seconds to wait for an event to happen
for this query. The estimate includes the amount of time to open a table or start
an ESP process.
IdleTime (SQL_DOUBLE)
Thread-Safe Database Access 29