skip to main content
Quick Start: Progress DataDirect for ODBC for Oracle Wire Protocol Driver for macOS : 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.

ArraySize

Purpose:
Determines the number of bytes the driver retrieves from a server for a fetch.
Performance Impact:
To improve throughput, increase the value of Array Size. By increasing the value of Array Size, you increase the number of bytes the driver will retrieve from the server for a fetch. In turn, increasing the number of bytes that the driver can retrieve reduces the number, and expense, of network round trips. Note that improved throughput does come at the expense of increased demands on memory and slower response time. Furthermore, if the fetch size exceeds the available buffer memory of the server, an out of memory error is returned when attempting to execute a fetch. If you receive this error, decrease the value specified until fetches are successfully executed.
Recommended Settings:
Tune this setting to reflect the typical fetch size of your application. Smaller fetch sizes can improve the initial response time of the query. Larger fetch sizes improve overall fetch times at the cost of additional memory.

CachedCursorLimit

Purpose:
Specifies the number of Oracle Cursor Identifiers that the driver stores in cache. A Cursor Identifier is needed for each concurrent open Select statement. When a Select statement is closed, the driver stores the identifier in its cache, up to the limit specified, rather than closing the Cursor Identifier. When a new Cursor Identifier is needed, the driver takes one from its cache, if one is available. Cached Cursor Identifiers are closed when the connection is closed.
Performance Impact:
To improve performance when your application executes concurrent Select statements, Cursor Identifiers can be cached. In this case, the Cursor Identifier is retrieved from a cache rather than being created for each connection. When an Identifier is needed, the driver takes one from its cache, if one is available, rather than creating a new one. Cached Cursor Identifiers are closed when the connection is closed. To cache Cursor Identifiers, the CachedCursorLimit attribute must be set to the appropriate number of concurrent open Select statements.
Recommended Settings:
If the number of concurrent Select statements your application typically executes is:
*greater than 1 but less than or equal to 10, specify a value of 10 for this option.
*greater than 10 but less than or equal to 50, specify a value of 50 for this option.
*greater than 50 but less than or equal to 200, specify a value of 200 for this option.
*greater than 200 but less than or equal to 400, specify a value of 400 for this option.
*greater than 400, specify that value.

CachedDescLimit

Purpose:
Specifies the number of descriptions that the driver saves for Select statements. These descriptions include the number of columns, data type, length, and scale for each column.
Performance Impact:
The driver can cache descriptions of Select statements and improve the performance of your ODBC application; therefore, if your application issues a fixed set of SQL queries throughout the life of the application, the description of the query should be cached. If a description is not cached, the description must be retrieved from the server, which reduces performance. The descriptions include the number of columns and the data type, length, and scale for each column. The matching is done by an exact-text match through the From clause. If the statement contains a Union or a subquery, the driver cannot cache the description.
Recommended Settings:
If your application issues a fixed set of SQL queries throughout the life of the application, specify a value that represents the number of descriptions that the driver saves for Select statements for improved performance.
If your application does not issue Select statements that returns a few rows repeatedly, set this option to 0.

CatalogIncludesSynonyms

Purpose:
Determines whether synonyms are included in calls to SQLProcedures, SQLStatistics, and SQLProcedureColumns.
Performance Impact:
Standard ODBC behavior is to include synonyms in the result set of calls to the following catalog functions: SQLProcedures, SQLStatistics, and SQLProcedureColumns. Retrieving this synonym information degrades performance.
Recommended Settings:
If your application does not need to return synonyms when using these catalog functions, the driver can improve performance if the CatalogIncludesSynonyms attribute is set to 0 (disabled).

CatalogOptions

Purpose:
Determines whether SQL_NULL_DATA is returned for the result columns REMARKS and COLUMN_DEF.
Performance Impact:
Retrieving actual values for the result column REMARKS reduces the performance of your catalog queries.
Recommended Settings:
If your application does not need to access the comments/remarks for database tables, the CatalogOptions attribute should be disabled (set to 0) because retrieving comments/remarks degrades performance.

Client Information Options

Purpose:
Client information options allow your application to store client information associated with a connection.
Performance Impact:
The client information feature automatically adjusts server resources, such as CPU and memory, based on the service class associated with a workload. Therefore, an application’s performance is tied to the workload to which it is assigned and, ultimately, to the service class associated with that workload. The Oracle Wire Protocol driver allows your application to set client information in the Oracle database that can be used by the client information feature to classify work.
Recommended Settings:
If you know that your database environment can use client information, coordinate with your database administrator to determine how setting the following Client Information options affects performance:
*AccountingInfo: Sets the CLIENT_INFO value of the V$SESSION table on the server.
*Action: Sets ACTION column of the V$SESSION table on the server.
*ApplicationName: Sets the dbms_session value in the database and the PROGRAM value of the V$SESSION table on the server.
*ClientHostName: Sets the MACHINE value in the V$SESSION table on the server.
*ClientID: Sets the CLIENT_IDENTIFIER value in the V$SESSION table on the server.
*ClientUser: Sets the OSUSER value in the V$SESSION table on the server.
*Module: Sets the CLIENT_IDENTIFIER value in the V$SESSION table on the server.
*ProgramID: Sets the PROCESS value in the V$SESSION table on the server.

DataIntegrityLevel

Purpose:
Specifies a preference for the data integrity to be used on data sent between the driver and the database server.
Performance Impact:
Checking data integrity may adversely reduce performance because of the additional overhead (mainly CPU usage) that is required to perform the check.
Recommended Settings:
If your application does not require data integrity checking, specify a value of 0 (Rejected) for improved performance.

DefaultLongDataBuffLen

Purpose:
The maximum length of data (in KB) the driver can fetch from long columns in a single round trip and the maximum length of data that the driver can send using the SQL_DATA_AT_EXEC parameter.
Performance Impact:
To improve performance when your application fetches images, pictures, or long text or binary data, a buffer size can be set to accommodate the maximum size of the data. The buffer size should only be large enough to accommodate the maximum amount of data retrieved; otherwise, performance is reduced by transferring large amounts of data into an oversized buffer. If your application retrieves more than 1 MB of data, the buffer size should be increased accordingly.
Recommended Settings:
Set DefaultLongDataBuffLen to a size no larger than the maximum size of data retrieved.

DescribeAtPrepare

Purpose:
Determines whether the driver describes the SQL statement at prepare time.
Performance Impact:
When enabled, the driver describes the SQL statement at prepare time, which requires extra network traffic.
Recommended Settings:
If your application does not require result set information at prepare time (for instance, you request information about the result set using SQLColAttribute(s), SQLDescribeCol, SQLNumResultCols, and so forth, before calling SQLExecute on a prepared statement), you can increase performance by specifying 0 (disabled) for this option.

EnableServerResultCache

Purpose:
Determines whether the driver sets the RESULT_CACHE_MODE session parameter to FORCE.
Note: This option only applies to connections to Oracle 11g or higher database servers that support server-side result set caching.
Performance Impact:
If your application connects to Oracle 11g and executes the same query multiple times, you can improve performance by using the Oracle feature server-side result set caching. When enabled, Oracle stores the result set in database memory. On subsequent executions of the same query, the result set is returned from database memory if the underlying tables have not been modified. Without result set caching, the server would process the query and formulate a new result set.
Recommended Settings:
If your application executes the same query multiple times, set to 1 (enabled) to improve 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.

LOBPrefetchSize

Purpose:
Specifies the size of prefetch data the server returns for BLOBs and CLOBs.
Note: LOB Prefetch Size is supported for Oracle database versions 12.1.0.1 and higher.
Performance Impact:
With LOB prefetching enabled (set to value equal to or greater than 0), the driver can return LOB meta-data and the beginning of LOB data along with the LOB locator during a fetch operation, therefore reducing the number of round trips and improving performance. For significant gains, specify a value that is large enough to entirely prefetch LOB values. This allows data to be available without having to go through LOB protocol, which can be expensive.
Recommended Settings:
If your application regularly processes LOB data, enable this option for better performance. Significant gains can be achieved by specifying a value reflective of the size of your LOB data.
If your application rarely processes LOB data, disable (-1) this option.

ProcedureRetResults

Purpose:
Determines whether the driver returns result sets from stored procedures/functions.
Performance Impact:
When this option is enabled, executing stored procedures that do not return a result set incur a small performance penalty.
Recommended Settings:
If your application's stored procedures do not return results, set to 0 to improve performance.

SDUSize

Purpose:
Specifies the size in bytes of the Session Data Unit (SDU) that the driver requests when connecting to the server.
Performance Impact:
Larger SDU sizes reduce the number of packets required to return data to the client, thus improving performance. However, excessively large packets may result in unnecessary burden on your network.
Recommended Settings:
If your application returns large result sets, set this option to the maximum SDU size configured on the database server.
If your application returns small result sets, set this option to a size smaller than the maximum.

ServerType

Purpose:
Determines whether the connection is established using a shared or dedicated server process (dedicated thread on Windows).
Performance Impact:
When using a dedicated server connection, a server process on UNIX (a thread on Windows) is created to serve only your application connection. When you disconnect, the process goes away. The socket connection is made directly between your application and this dedicated server process. This can provide tremendous performance improvements, but will use significantly more resources on UNIX servers. Because this is a thread on Oracle servers running on Windows platforms, the additional resource usage on the server is significantly less.
Recommended Settings:
This option should be set to 2 (dedicated) when you have a batch environment with lower numbers of connections, your Oracle server has excess processing capacity and memory available when at maximum load, or if you have a performance-sensitive application that would be degraded by sharing Oracle resources with other applications.

UseCurrentSchema

Purpose:
Determines whether the driver returns only procedures owned by the current user when executing SQLProcedures.
Performance Impact:
If your application needs to access database objects owned only by the current user, then performance can be improved. When UseCurrentSchema is enabled, the driver returns only database objects owned by the current user when executing catalog functions. Calls to catalog functions are optimized by grouping queries. Enabling this option is equivalent to passing the Logon ID used on the connection as the SchemaName argument to the catalog functions.
Recommended Settings:
If your application needs to access database objects owned only by the current user, set to 1 (enabled) to improve performance.