The mi_lo_specset_estbytes() function

The mi_lo_specset_estbytes() function sets the estimated size of a smart large object.

Syntax

mi_integer mi_lo_specset_estbytes(LO_spec, estbytes)
   MI_LO_SPEC *LO_spec;
   mi_int8 *estbytes;
LO_spec
A pointer to the LO-specification structure in which to save the estimated size.
estbytes
A pointer to an eight-byte integer (mi_int8) that contains the desired estimated number of bytes for the smart large object.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_lo_specset_estbytes() function is the LO-specification accessor function that sets the estimated size for a new smart large object. The estbytes value is the estimated final size, in bytes, of the smart large object. This estimate is an optimization hint for the smart-large-object optimizer.
Important: Before you call mi_lo_specset_estbytes(), you must initialize an LO-specification structure.

After you set the estimated size in an LO-specification structure, you pass this structure to a smart-large-object creation function (such as mi_lo_create()) to provide the estimated size as a user-supplied storage characteristic for a new smart large object.

The smart-large-object optimizer attempts to optimize the extent size based on past operations on the smart large object and other storage characteristics (such as maximum bytes) that it obtains from the storage-characteristics hierarchy. Most applications can use the size estimate that the smart-large-object optimizer generates.
Important: Do not specify an estimated size unless you have enough information about the data to provide a useful estimate. If you do set the estimated size for a smart large object, do not specify a value much higher than the final size of the smart large object. Otherwise, the database server might allocate unused storage.

For more information about the estimated size of a smart large object or about how to use the mi_lo_specset_estbytes() function, see the HCL OneDB™ DataBlade® API Programmer's Guide.

Return values

MI_OK
The function was successful.
MI_ERROR
The function was not successful.