Work with disk-storage information

Disk-storage information helps the database server determine how to manage the smart large object most efficiently on disk.
Important: For most applications, use the values that the database server calculates for the disk-storage information. Methods provided in HCL OneDB™ JDBC Driver are intended for special situations.
This disk-storage information includes:
  • Allocation-extent information:
    • Extent size:

      An allocation extent is a collection of contiguous bytes within an sbspace that the database server allocates to a smart large object at one time. The database server performs storage allocations for smart large objects in increments of the extent size.

      You can specify an extent size by calling the ifxLobDescriptor.setExtSize() method.

    • Next-extent size:

      The database server tries to allocate an extent as a single, contiguous region in a chunk. However, if no single extent is large enough, the database server must use multiple extents as necessary to satisfy the current write request. After the initial extent fills, the database server attempts to allocate another extent of contiguous disk space. This process is called next-extent allocation.

    For more information about extents, see the topics on disk structure and storage in the HCL OneDB Administrator's Guide.

  • Sizing information:
    • Estimated number of bytes in a new smart large object
    • Maximum number of bytes to which the smart large object can grow

    To specify sizing information, you can use the setMaxBytes() and setEstBytes() methods in the ifxLobDescriptor class.

    If you know the size of the smart large object, specify this size using the setEstBytes() method. This is the best way to set the extent size because the database server can allocate the entire smart large object as one extent.

  • Location:

    The name of the sbspace identifies the location at which to store the smart large object. To set this name, you can use the vifxLobDescriptor.setSbSpace() method.

The database server uses the disk-storage information to determine how best to size, allocate, and manage the extents of the sbspace. It can calculate all disk-storage information for a smart large object except the sbspace name.

The following table summarizes the ways to specify disk-storage information for a smart large object.

Table 1. Specifying disk-storage information

Methods to specify disk-storage information for a smart large object. System-specified disk storage information is obtained by either using the system default value or specified by the onspaces utility. Column-level storage characteristics are specified by the PUT clause of CREATE TABLE. User-specified storage characteristics are specified by the HCL OneDB JDBC Driver method.

Disk-storage information System-specified storage characteristics Column-level storage characteristics User-specified storage characteristics
System default value Specified by onspaces utility Specified by PUT clause of CREATE TABLE Specified by the HCL OneDB JDBC Driver method
Size of extent Calculated by database server EXTENT_SIZE EXTENT SIZE Yes
Size of next extent Calculated by database server NEXT_SIZE No No
Minimum extent size 4 kilobytes MIN_EXT_SIZE No No
Size of smart large object Calculated by database server Average size of all smart large objects in sbspace: AVG_LO_SIZE No Estimated size of a particular smart large object Maximum size of a particular smart large object
Maximum size of I/O block Calculated by database server MAX_IO_SIZE No No
Name of sbspace SBSPACENAME -S option Name of an existing sbspace in which a smart large object: IN clause Yes