skip to main content
Using the Driver : Performance Considerations
  

Try DataDirect Drivers Now

Performance Considerations

Application Using Threads (ApplicationUsingThreads): 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. In this case, the ApplicationUsingThreads attribute should be disabled (set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional options that affect performance:
*Load Balance Timeout (LoadBalanceTimeout): You can define how long to keep connections in the pool. The time that a connection was last used 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 (ConnectionReset ): 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 (MaxPoolSize): 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 (MinPoolSize ): 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.
Enable Bulk Fetch (EnableBulkFetch): The Enable Bulk Fetch option can be used to improve performance by enabling the driver to use the Salesforce Bulk API for selects. Using the Salesforce Bulk API may significantly reduce the number of Web service calls used to execute a statement and, therefore, may improve performance. When Enable Bulk Fetch is set to 1 (enabled), the driver uses the Salesforce Bulk API based on the value of the Bulk Fetch Threshold connection option. If the number of rows expected in the result set exceeds the value of Bulk Fetch Threshold option, the driver uses the Salesforce Bulk API to execute the select operation.
If there is a TOP or LIMIT clause in the select query, the driver considers the TOP or LIMIT clause value as the expected number of rows in the result set and compares it with the value of the Bulk Fetch Threshold option to choose either Bulk API or REST API for executing the select query.
If the value of TOP or LIMIT clause is greater than that of the Bulk Fetch Threshold option, but the actual row count in the result set is less, the performance of the select query might be affected adversely.
Enable Bulk Load (EnableBulkLoad): The Enable Bulk Load option can be used to improve performance by enabling the driver to use the Salesforce Bulk API for inserts, updates, and deletes. Using the Salesforce Bulk API may significantly reduce the number of Web service calls used to execute a statement and, therefore, may improve performance. When Enable Bulk Load is set to 1 (enabled), the driver uses the Salesforce Bulk API based on the value of the Bulk Load Threshold connection option. If the number of affected rows exceeds the value of Bulk Load Threshold option, the driver uses the Salesforce Bulk API to execute the insert, update, or delete operation.
Enable Primary Key Chunking (EnablePKChunking): The Enable Primary Key Chunking option can be used to improve performance by enabling the driver to use PK chunking for bulk fetch operations. When Enable Primary Key Chunking is set to 1(enabled), the driver uses PK chunking to execute the select operations if the expected number of rows in the result set is greater than the values of the Bulk Fetch Threshold and Primary Key Chunk Size options. For this behavior to take effect, the Enable Bulk Fetch option must also be set to 1 (enabled).
Note: PK chunking is supported for all custom objects and the following standard objects: Account, Campaign, CampaignMember, Case, Contact, Lead, LoginHistory, Opportunity, Task, and User. In addition, PK chunking is supported for sharing objects as long as the parent object is supported.
Fetch Size/WS Fetch Size (FetchSize/WSFetchSize): The connection options Fetch Size and WSFetch Size can be used to adjust the trade-off between throughput and response time. In general, setting larger values for WSFetch Size and Fetch Size will improve throughput, but can reduce response time.
For example, if an application attempts to fetch 100,000 rows from the remote data source and WSFetch Size is set to 500, the driver must make 200 Web service calls to get the 100,000 rows. If, however, WSFetch Size is set to 2000 (the maximum), the driver only needs to make 50 Web service calls to retrieve 100,000 rows. Web service calls are expensive, so generally, minimizing Web service calls increases throughput. In addition, many Cloud data sources impose limits on the number of Web service calls that can be made in a given period of time. Minimizing the number of Web service calls used to fetch data also can help prevent exceeding the data source call limits.
For many applications, throughput is the primary performance measure, but for interactive applications, such as Web applications, response time (how fast the first set of data is returned) is more important than throughput. For example, suppose that you have a Web application that displays data 50 rows to a page and that, on average, you view three or four pages. Response time can be improved by setting Fetch Size to 50 (the number of rows displayed on a page) and WSFetch Size to 200. With these settings, the driver fetches all of the rows from the remote data source that you would typically view in a single Web service call and only processes the rows needed to display the first page.
WSPoolSize (WSPoolSize)PK chunking is supported for all custom objects and the: WSPoolSize determines the maximum number of sessions the driver uses when there are multiple active connections to Salesforce. By increasing this number, you increase the number of sessions the driver uses to distribute calls to Salesforce, thereby improving throughput and performance. For example, if WSPoolSize is set to 1, and you have two open connections, the session must complete a call from one connection before it can begin processing a call from the other connection. However, if WSPoolSize is equal to 2, a second session is opened that allows calls from both connections to be processed simultaneously.
Note: The number specified for WSPoolSize should not exceed the amount of sessions permitted by your Salesforce account.