Array Send Size: The value for this option can be an integer from 1 to 4,294,967,296 (4 GB); the default is 4096 (4 MB). The value 1 is a special value that does not define the number of bytes but, instead, causes the data provider to allocate space for exactly one row of data. Larger values increase throughput by reducing the number of times the data provider fetches data across the network when retrieving multiple rows. Smaller values improve response time, as there is less of a delay waiting for the server to transmit data.
Batch Update Behavior: When batch updating is enabled, you can optimize performance with array binding. If your application 1) uses batch operations for inserts, updates, or deletes and 2) performs these operations on many values in the same columns, the Oracle data provider can use array binding to optimize batch updates. In this case, set this option to ArrayBindWhenPossible. If your application 1) uses batch operations for inserts only and 2) inserts many values in the same columns, the data provider can use array binding to optimize batch inserts. In this case, set this option to ArrayBindOnlyInserts.
Commit Behavior: Typically, redo changes generated by update transactions are written to disk immediately when the transaction is committed, and the session waits for the disk write to complete before returning control to the application. Oracle 10g R2 can let the log writer write the redo changes to disk in its own time instead of immediately and return control to the application before the disk write is complete instead of waiting. Not waiting for the disk write improves performance for applications that perform update operations and where data integrity is not critical. For example, most banking applications cannot tolerate data loss in the event that the server has a problem writing the redo changes to disk or fails during the process, but many logging applications for diagnostic purposes can.
Enable Server Result Cache: If your application connects to Oracle 11
g and executes the same query multiple times, you can improve performance by using the Oracle server-side resultset caching feature. 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.
Encryption Method: Data encryption can adversely affect performance because of the additional overhead (mainly CPU usage) required to encrypt and decrypt data.
Enlist: If your application needs to connect to more than one database, you need to use distributed transactions. Using distributed transactions impacts performance in two ways. To enlist in distributed transactions, the Oracle data provider must call some unmanaged code, which incurs performance and security issues (see
“About the Data Providers”). In addition, distributed transactions require additional logging and network round trips, making them up to four times slower than local transactions. If your application connects to only one database and you do not need to connect to another database, set this option to False and use local transactions.
Packet Buffer Size: Increasing the buffer size often improves performance for applications that have large result sets. The packet buffer size should be the same as or smaller than the size set for Fetch Array Size.
Pooling: If you enable the data provider to use connection pooling, you can define additional options that affect performance:
■
|
Load Balance Timeout: You can define how long to keep connections in the pool. The pool manager checks a connection's creation time when it is returned to the pool. The creation time is compared to the current time, and if the timespan exceeds the value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can cause some connections to ignore this value.
|
■
|
Connection Reset: Resetting a re-used connection to the initial configuration settings impacts performance negatively because the connection must issue additional commands to the server.
|
■
|
Max Pool Size: 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 resources.
|
■
|
Min Pool Size: 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 Load Balance Timeout value.
|
Procedure Description Cache: When executing a stored procedure, the Oracle data provider needs information about the REF CURSOR parameters the stored procedure uses. By caching the stored procedure information obtained from the server, the data provider can significantly reduce the number of round trips to the server. Applications that change stored procedure definitions during runtime should not use this cache.
Schema Options: Returning some types of database metadata can affect performance. To optimize application performance, the data provider prevents the return of performance-expensive database metadata such as procedure definitions or view definitions. If your application needs this database metadata, you can specifically request its return.
Session Data Unit: For maximum performance, the data provider should transmit data to the database server in packets (Session Data Unit) that are equal in size to the maximum SDU size configured on the database server.
Server Type: When using a dedicated server connection, a server process on Linux/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 uses significantly more resources on Linux/UNIX servers.
Wire Protocol Mode: Set this option to 2 if:
BatchUpdateSize: If your application uses disconnected DataSets and updates those DataSets, you can positively influence performance by setting the BatchUpdateSize property of the DataAdapter object to a value greater than 1. By default, the data provider attempts to use the largest batch size possible. However, this may not equate to optimal performance for your application. The value you set depends on the number of rows you are typically updating in the DataSet. For example, if you are updating less than 50 rows, a suggested setting for this property is 25.
CurrentUserAffinityTimeout: Increasing the CurrentUserAffinityTimeout can increase the chances that a connection with the same CurrentUser exists in the pool. However, when set too high relative to other CurrentUserAffinityTimeout values, the connection pool might have to create new connections, which is more performance-expensive than reauthenticating an existing connection.