Easysoft ODBC-ODBC Bridge

I only want to retrieve data from the server, are there any tricks to speed it up in read-only mode?

Last Reviewed:
24th January 2024

If you have written the application then using bound columns and large array sizes is a great deal more efficient over a network. The Easysoft ODBC-ODBC Bridge client pulls all the bound columns over in one go which is a lot quicker than using repeated SQLFetchs and multiple SQLGetData calls, one per column.

If you do not want to change your application (or cannot) and you are only reading data from the database (and not using positioned updates, deletes etc.) then the ODBC-ODBC Bridge has a built in block-fetch-mode, which may be enabled with the DSN attribute, BlockFetchSize. Add "BlockFetchSize = num" to the DSN entry you are using. num is the number of rows to retrieve in one go. This shows significant speed increases for the reasons in the paragraph above, but may not be used with certain types of cursors and when doing positioned updates/deletes.

Note that a value of 0 means block-fetch-mode is turned off and the ODBC-ODBC Bridge works as a normal ODBC driver.

A value of 1 is safe to use even if you are doing positioned updates and deletes, and is often faster than with block-fetch-mode turned off.

The ODBC-ODBC Bridge performs the following tests to decide whether BlockFetchMode is possible:

  1. Cursor type must be FORWARD_ONLY.
  2. RowArraySize must be 1.
  3. There mustn't be any bound columns.
  4. If the driver is Microsoft SQL Server then the application must support ODBC 3 or later.

    The Microsoft SQL Server ODBC driver will not return RowsProcessedPtr to an ODBC 2.0 application.

  5. The row bind offset must not have been set.
  6. You must not be using SQLExtendedFetch.

Note from the above checks, BlockFetchSize has no effect when the application or interface is using bound columns itself to retrieve data (e.g. Perl's DBD::ODBC).

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)