Home How To Online Documentation Support Download Order

 

 

Connecting to databases
Transactions
Executing an SQL command
Executing stored procedures
Binding input parameters
Fetching result set
Fetching multiple result sets
Optimizing Database Performance
Returning output parameters
Working with Long or Lob(CLob, BLob) Data
Working with date/time values
Error handling
Using native API
Query examples


Optimizing Database Performance

The goal of performance tuning is to minimize the response time for each query.

One of the ways to accelerate transactions is minimizing expensive network traffic between the server and client. It can be useful when working with recordsets with a great number of rows.

SQLAPI++ Library provides support for bulk row fetching, which means that multiple records can be retrieved at once during a single fetch, rather than retrieving one record at a time from the data source. To set bulk row fetching you should set PreFetchRows command option before the command execution. It is safe to use PreFetchRows option in any DBMS. If DBMS does not support bulk row fetching then this option will be ignored.

The value of PreFetchRows option specifies how many rows you wish to retrieve during a single fetch when using bulk row fetching. The default value is "1"; it means that you are not using bulk row fetching.

See Example to compare time expended on fetching rows with and without bulk mode.

Problems and Questions

If you haven't found the answer to your questions or have some problems on using the Library, please, send e-mail to howto@sqlapi.com.