Performance Considerations
- Last Updated: May 18, 2020
- 2 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
BatchMechanism: When Batchmechanism is set to multiRowInsert, the driver executes a single insert
statement for all the rows contained in a parameter array. If the size of the insert
statement exceeds the available buffer memory of the server, the driver executes
multiple statements. This default behavior provides substantial performance gains for
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 when using scroll-insensitive result sets, the driver can cache the result set data in memory instead of writing it to disk. By default, the driver caches 2 MB of insensitive result set data in memory and writes any remaining result set data to disk. Performance can be improved by increasing the amount of memory used by the driver before writing data to disk or by forcing the driver to never write insensitive result set data 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.
Refer to Designing JDBC applications for performance optimization in the Progress DataDirect for JDBC Drivers Reference for more information about using prepared statement pooling to optimize performance.
StringDescribeType: To obtain data from String columns with the
getClob() method, the StringDescribeType connection property must be set to
longvarchar. (Otherwise, calling getClob() results in an "unsupported data
conversion" exception.) When StringDescribeType is set to longvarchar, the
driver not only maps String to Longvarchar but also allocates more space to cache the long
data. Because more space is allocated for the long data, your application will incur a
performance penalty.
UseCurrentSchema: If your application needs to access tables and views
owned only by the current user, performance of your application can be improved by setting
this property to true. When this property is set to true, the driver returns only tables and views owned by the current
user when executing getTables() and getColumns() methods. Setting this property to true is equivalent to passing the user ID used on the connection as
the schemaPattern argument to the getTables() or getColumns() call.