skip to main content
Quick Start: Progress DataDirect for ODBC for Amazon Redshift Wire Protocol Driver for UNIX/Linux : Tuning for Performance
  

Try DataDirect Drivers Now

Tuning for Performance

The connection options described in this section directly affect the performance of your driver. To tune for performance, configure your driver according to the recommended settings and your environment.

ApplicationUsingThreads

Purpose:
Determines whether the driver works with applications using multiple ODBC threads.
Performance Impact:
The driver coordinates concurrent database operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver, it also decreases performance. If your application does not make ODBC calls from different threads, the driver has no reason to coordinate operations.
Recommended Settings:
If your application is multi-threaded, set to 1 (enabled).
If your application is not multi-threaded, set to 0 (disabled) for improved performance.

ConnectionReset

Purpose:
Determines whether the state of connections that are removed from the connection pool for reuse by the application is reset to the initial configuration of the connection.
Note: The value for this option is ignored when Connection Pooling is disabled (Pooling=0).
Performance Impact:
Resetting a re-used connection to the initial configuration settings impacts performance negatively because the connection must issue additional commands to the server.
Recommended Settings:
Set to 0 (disabled) for improved performance.

EncryptionMethod

Purpose:
Determines the method the driver uses to encrypt data sent between the driver and the database server.
Performance Impact:
Data encryption may adversely affect performance because of the additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Recommended Settings:
If data encryption is not required, set to 0 (No Encryption) for improved performance.

FailoverMode

Purpose:
Specifies the type of failover method the driver uses.
Performance Impact:
Although high availability that replays queries after a failure provides increased levels of protection, it can adversely affect performance because of increased overhead.
Recommended Settings:
If your application does not require the ability to recover or restart transactions, set this option to 0 (Connection) for improved performance.

LoadBalanceTimeout

Purpose:
Specifies the number of seconds to keep inactive connections open in a connection pool.
Note: The value for this option is ignored when Connection Pooling is disabled (Pooling=0).
Performance Impact:
By configuring LoadBalanceTimeout to keep inactive connections open, you improve the likelihood that the driver can reuse an existing connection instead of establishing new one when a connection is needed. This improves performance by avoiding the overhead required to establish a new connection.
The MinPoolSize option can cause some connections to ignore this value.
Recommended Settings:
Set to 0 for improved performance. By specifying a value of 0 (the default), inactive connections are kept open.

MaxPoolSize

Purpose:
The maximum number of connections allowed within a single connection pool. When the maximum number of connections is reached, no additional connections can be created in the connection pool.
Note: The value for this option is ignored when Connection Pooling is disabled (Pooling=0).
Performance Impact:
Setting the maximum number of connections that the pool can contain too low might cause delays while waiting for a connection to become available. Setting the number too high wastes memory resources.
Recommended Settings:
Tune this setting for your environment. Specify the maximum number of connections your environment requires to have open at a time.

MinPoolSize

Purpose:
Specifies the minimum number of connections that are opened and placed in a connection pool, in addition to the active connection, when the pool is created. The connection pool retains this number of connections, even when some connections exceed their LoadBalanceTimeout value.
Note: The value for this option is ignored when Connection Pooling is disabled (Pooling=0).
Performance Impact:
A connection pool is created when the first connection with a unique connection string connects to the database. The pool is populated with connections up to the minimum pool size, if one has been specified. The connection pool retains this number of connections, even when some connections exceed their LoadBalanceTimeout value. By increasing this number, you improve the likelihood that the driver will be able to reuse a connection; thereby, improving performance.
Recommended Settings:
Tune this setting for your environment. Specify the average number of connections your environment typically uses at a time.

Pooling

Purpose:
Specifies whether to use the driver’s connection pooling.
Performance Impact:
Connection pooling allows you to reuse connections rather than creating a new one every time the driver needs to establish a connection to the underlying database. Using connection pooling can improve performance by avoiding the penalty incurred when establishing a new connection, especially for high-throughput applications.
You can further affect the performance by tuning the following connection options that are related to connection pooling: ConnectionReset, MaxPoolSize, MinPoolSize, and LoadBalanceTimeout.
Recommended Settings:
Set to 1 (enabled) to improve performance.