skip to main content
DataDirect Connect Drivers : MySQL Driver : Performance Considerations
  
Performance Considerations
You can optimize your application’s performance if you set the MySQL driver connection properties as described in this section:
EncryptionMethod: Data encryption may adversely affect performance because of the additional overhead (mainly CPU usage) required to encrypt and decrypt data.
InOrderColumnAccess: If your application always gets data in the order that it was returned from the database, this property should be set to true. When this option is set to true, the driver does not cache column values of the current row, which improves performance.
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.
Refer to "Designing JDBC Applications for Performance Optimization" in the DataDirect Connect Series for JDBC Reference for more information about using prepared statement pooling to optimize performance.