Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

18.17.4 Estimating the CallableStatement object size

The following shows the formulas for estimating the CallableStatement object size.

Formula (for 32-bit mode)

CallableStatement object size =
39000 + (2100 + input data storage area size + output data storage area size)
x number of CallableStatement instances (bytes)
 

Formula (for 64-bit mode)

CallableStatement object size =
40000 + (2600 + input data storage area size + output data storage area size)
x number of CallableStatement instances (bytes)
 
Input data storage area size: If the IN and INOUT parameters are used, use the following formula to determine the value:

[Figure]

The method for determining the data length for IN and INOUT parameters is the same as for the method for determining the length of input parameter information for Connection objects.
Output data storage area size: If the INOUT and OUT parameters are used, use the following formula to determine the value:

[Figure]

Definition length of data for INOUT and OUT parameters: If the INOUT and OUT parameters are BLOB or BINARY and the locator facility is used, the value is 4. If the locator facility is not used, the value is one of the following:
  • If HiRDB_for_Java_MAXBINARYSIZE is omitted:
    8 + definition length
  • If HiRDB_for_Java_MAXBINARYSIZE is specified:
    MIN(8 + definition length, 8 + HiRDB_for_Java_MAXBINARYSIZE value)