Calculations to Determine Bind Array Size

The bind array's size is equivalent to the number of rows it contains times the maximum length of each row. The maximum length of a row equals the sum of the maximum field lengths, plus overhead, as follows:

bind array size =
    (number of rows) * (  SUM(fixed field lengths)
                        + SUM(maximum varying field lengths)
                        + ( (number of varying length fields)
                             * (size of length indicator) )
                       )

Many fields do not vary in size. These fixed-length fields are the same for each loaded row. For these fields, the maximum length of the field is the field size, in bytes, as described in "SQL*Loader Data Types". There is no overhead for these fields.

The fields that can vary in size from row to row are:

  • CHAR

  • DATE

  • INTERVAL DAY TO SECOND

  • INTERVAL DAY TO YEAR

  • LONG VARRAW

  • numeric EXTERNAL

  • TIME

  • TIMESTAMP

  • TIME WITH TIME ZONE

  • TIMESTAMP WITH TIME ZONE

  • VARCHAR

  • VARCHARC

  • VARGRAPHIC

  • VARRAW

  • VARRAWC

The maximum length of these data types is described in "SQL*Loader Data Types". The maximum lengths describe the number of bytes that the fields can occupy in the input data record. That length also describes the amount of storage that each field occupies in the bind array, but the bind array includes additional overhead for fields that can vary in size.

When the character data types (CHAR, DATE, and numeric EXTERNAL) are specified with delimiters, any lengths specified for these fields are maximum lengths. When specified without delimiters, the size in the record is fixed, but the size of the inserted field may still vary, due to whitespace trimming. So internally, these data types are always treated as varying-length fields—even when they are fixed-length fields.

A length indicator is included for each of these fields in the bind array. The space reserved for the field in the bind array is large enough to hold the longest possible value of the field. The length indicator gives the actual length of the field for each row.

Note:

In conventional path loads, LOBFILEs are not included when allocating the size of a bind array.