skip to main content
About the Driver : Using the Driver : Performance Considerations
  

Performance Considerations

You can optimize application performance by adopting guidelines described in this section.
BatchMechanism: If your application does not require individual update counts for each statement or parameter set in the batch, then BatchMechanism should be set to MultiRowInsert. Unlike the native batch mechanism, the multi-row insert mechanism only returns the total number of update counts for batch inserts. Setting BatchMechanism to MultiRowInsert therefore offers substantial performance gains when performing batch inserts.
EncryptionMethod: Data encryption may adversely affect performance because of the additional overhead (mainly CPU usage) required to encrypt and decrypt data.
InsensitiveResultSetBufferSize: To improve performance, result set data can be cached instead of written to disk. If the size of the result set data is greater than the size allocated for the cache, the driver writes the result set to disk. The maximum cache size setting is 2 GB.
MaxPooledStatements: To improve performance, the driver's own internal prepared statement pooling should be enabled when the driver does not run from within an application server or from within another application that does not provide its own prepared statement pooling. When the driver's internal prepared statement pooling is enabled, the driver caches a certain number of prepared statements created by an application. For example, if the MaxPooledStatements property is set to 20, the driver caches the last 20 prepared statements created by the application. If the value set for this property is greater than the number of prepared statements used by the application, all prepared statements are cached. (See Designing JDBC Applications for Performance Optimization for more information about using prepared statement pooling to optimize performance.)
ResultSetMetaDataOptions: The driver’s performance may be adversely affected if you set this option to 1. If set to 1 and the ResultSetMetaData.getTableName method is called, the driver performs emulations which take additional processing.
VarcharClobThreshold: There are performance penalties when enabling CLOB functionality. To provide the benefits associated with Clobs, data must be cached. Because data is cached, your application will incur a performance penalty, particularly if data is read once sequentially. This performance penalty can be severe if the size of the long data is larger than available memory. If you want to avoid the performance penalties associated with CLOB functionality, you should set this value at a value greater than the maximum Character varying column width your application handles.