INFORMIX
DataBlade API Programmer's Manual
Chapter 12: DataBlade API Function Descriptions
Home Contents Index Master Index New Book

mi_lo_specset_estbytes()

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

Syntax

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.

Once 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 characteristics 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.

Return Values

MI_OK

The function was successful.

MI_ERROR

The function was not successful.

Related Topics

See the descriptions of the following functions: mi_lo_copy(), mi_lo_create(), mi_lo_expand(), mi_lo_from_file(), mi_lo_spec_free(), mi_lo_spec_init(), and mi_lo_specget_estbytes().

In Chapter 3, "Handling Smart Large Objects," see "Storage Characteristics" for more information on the estimated size of a smart large object. See "The LO-Specification Structure", and "Defining User-Specified Storage Characteristics" for information on how to use the mi_lo_specset_estbytes() function.




DataBlade API Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.