5.14 Improving performance by batch transfer of retrieval results
You can transfer multiple rows of retrieval results in the batch mode from the HADB server to the HADB client. This feature is useful when you retrieve a large amount of data.
The following figure provides an overview of batch transfer of retrieval results.
Specify a setting to transfer retrieval results in the batch mode. The following are the possible settings:
-
If you use a JDBC driver:
Specify the number of rows to be transferred in the batch mode by using one of the following methods:
-
adb_clt_fetch_size in the system properties, user properties, or URL connection properties
-
setFetchSize method of the Statement object
-
setFetchSize method of the ResultSet object
-
-
If you use ODBC drivers or CLI functions:
Specify the number of rows to be transferred in the batch mode in the adb_clt_fetch_size operand in the client definition.
If the appropriate setting above is specified and rows are retrieved, the retrieval results are transferred in the batch mode.
- Notes
-
-
As the number of rows to be transferred in the batch mode increases, the amount of memory used by the HADB server and HADB client also increases. Therefore, if you will be performing batch transfer, re-evaluate the memory requirements. For details about the memory requirements for HADB servers, see Determining the memory requirement during normal operation in the HADB Setup and Operation Guide. For details about the memory requirements for HADB clients, see C. Estimating the Memory Requirements for an HADB Client
-
If an error occurs during batch transfer, retrieval results buffered on the HADB server are discarded and only error information is returned to the HADB client.
-
If an update SQL statement is run during retrieval using a cursor, the result of the update operation might be applied to the retrieval results, depending on the timing. However, the result of the update operation is never applied to the retrieval results during retrieval using batch transfer. This is because the HADB server is not accessed by an HADB client on which retrieval results remain.
-