Memory Management of TEXT and BYTE Data Types Informix JDBC Driver fetches TEXT and BYTE data into two different locations, depending on the size of the data. If the TEXT or BYTE value is less than or equal to 1024 bytes, Informix JDBC Driver fetches the value into main memory. This improves the performance of retrieving small simple large object data. If, however, the TEXT or BYTE value is larger than 1024 bytes, Informix JDBC Driver first attempts to store the value in a file on the operating system. If this attempt fails, the entire TEXT or BYTE value is fetched into main memory, regardless of its size. This ensures that values fetched from within a Java applet are retrieved correctly, even though browsers are usually unable to write to the local operating system. For programming information on how to use the TEXT and BYTE data types in a Java program, refer to "Manipulating Informix BYTE and TEXT Data Types".
Reducing Network Traffic The two environment variables OPTOFC and IFX_AUTOFREE can be used to reduce network traffic when you close Statement and ResultSet objects. Set OPTOFC to 1 to specify that the ResultSet.close() method does not require a network round-trip if all the qualifying rows have already been retrieved in the client's tuple buffer. The database server automatically closes the cursor after all the rows have been retrieved. Informix JDBC Driver might or might not have additional rows in the client's tuple buffer before the next ResultSet.next() method is called. Therefore, unless Informix JDBC Driver has received all rows from the database server, the ResultSet.close() method might still require a network round-trip when OPTOFC is set to 1. Set IFX_AUTOFREE to 1 to specify that the Statement.close() method does not require a network round-trip to free the server cursor resources if the cursor has already been closed in the database server. The database server automatically frees the cursor resources right after the cursor is closed, either explicitly by the ResultSet.close() method or implicitly by the OPTOFC environment variable. When the cursor resources have been freed, the cursor can no longer be referenced. For examples of how to use the OPTOFC and IFX_AUTOFREE environment variables, see the autofree.java and optofc.java demo examples. In these examples, the variables are set with the Properties.put() method. For more information on setting Informix environment variables, refer to "Establishing a Connection".
1