In addition to the features documented in the release notes, this document describes feature and performance topics not covered in the IBM Informix JDBC Driver Programmer's Guide or modified since publication.
The following new features are not yet documented in IBM Informix JDBC Driver Programmer's Guide, Version 3.0:
The Scrollable ResultSet fetches one row at a time from the server. A performance enhancement for Scrollable ResultSet allows mutiple rows to be fetched at one time. In the following example, where the rows m through n are desired, the following will fetch the rows into a ResultSet. As long as only rows between m and n inclusive are accessed, no further fetches will occur. In the following example, the rows 50 through 100 are desired and the ResultSet is SCROLL_INSENSITIVE:
rs.setFetchSize(51); rs.absolute(49); // one row will be fetched rs.next() // rs will contain 51 rows
IBM Informix Dynamic Server only fetches in the forward direction and only fetches one row, except when a DIR_NEXT fetch is used to fetch rows. For a DIR_NEXT operation, the server will send rows until the fetch buffer is filled or until the last row is sent. Only resultSet.next() can generate a DIR_NEXT operation. This performance enhancement does not change the behavior of FORWARD_ONLY ResultSets. The calculation of the size of the fetch buffer is unchanged. For SCROLL_INSENTIVE ResultSets, the size of the fetch buffer is determined by the fetch size and row size. Statement.setFetchSize() and ResultSet.setFetchSize() can be used to set the fetch size. If fetch size is zero, the default fetch buffer size will be used. The fetch buffer size is limited to 32K. Certain ResultSet methods require information on the number of rows generated by the query. The methods may result in fetching a row to obtain the information and then re-fetching the current row. The methods are isBeforeFirst(), isLast(), and absolute(-row).
Additionally, setRowNum() can change the fetch buffer size for SCROLL_INSENSITIVE ResultsSets. Because additional server support will be required to ensure efficient use of setRowNum(), it is recommended that ResultSet.setRowNum() not be used as this time.
If a JDBC application uses group entries from the sqlhosts file to connect to server, and if group entries are part of an HDR pair, then the JDBC driver will connect to the primary server. Consider an sqlhosts file that defines a group, as shown below:
g_950 group - - i=100 ids950_secondary ontlitcp amazon sec_950 g=g_950 ids950_primary ontlitcp amazon prim_950 g=g_950
Now if the JDBC application uses a connection URL that uses this sqlhosts file and group name to make a connection, the JDBC driver will always connect to the primary server. The following is an example of such a URL:
"jdbc:informix-sqli:informixserver=g_950; user=foo;password=XXXX;SQLH_TYPE=FILE; SQLH_FILE=/informix/sqlhosts"
An exception will be thrown if the JDBC driver cannot find a primary server in the group.
(C) Copyright IBM Corp. 1994, 2005