The mi_lo_specget_estbytes() function

The mi_lo_specget_estbytes() function obtains from an LO-specification structure the estimated size, in bytes, of a smart large object.

Syntax

mi_integer mi_lo_specget_estbytes(LO_spec, estbytes)
   MI_LO_SPEC *LO_spec;
   mi_int8 *estbytes;
LO_spec
A pointer to the LO-specification structure from which to obtain the estimated size.
estbytes
A pointer to an eight-byte integer (mi_int8) value into which mi_lo_specget_estbytes() puts the 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_specget_estbytes() function is the LO-specification accessor function that returns the estimated size from a set of storage characteristics. 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_specget_estbytes(), you must put storage characteristics into an LO-specification structure.
You can use any of the following functions to initialize the LO-specification structure:
  • The mi_lo_colinfo_by_ids() or mi_lo_colinfo_by_name() function puts storage characteristics that are associated with a particular CLOB or BLOB column in an LO-specification structure.
  • The mi_lo_stat_cspec() function puts storage characteristics of an existing smart large object in an LO-specification.
  • The mi_lo_specget_estbytes() function sets the estimated size in an LO-specification structure.

The mi_lo_specget_estbytes() function obtains the current value for the estimated size from the LO-specification structure that LO_spec references.

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

Return values

MI_OK
The function was successful.
MI_ERROR
The function was not successful; the LO-specification structure might be invalid.