Database Statistics

The mco_class_stat_get() and mco_index_stat_get() APIs return memory usage statistics in the structures defined below. The Database Calculator can also be used to estimate runtime memory consumption for a class, its indexes, and dynamic objects.

Following is the definition of the mco_class_stat_t structure, which provides memory usage statistics for a class:


    typedef struct mco_class_stat_t_
    {
        mco_uint4           type;           /* type, MCO_CLSST_ flags */
        mco_counter_t       objects_num;    /* Total number of instances of the class */
        mco_counter32_t     versions_num;   /* Number of instances including all versions (for MVCC) */
        mco_counter32_t     core_pages;     /* Pages used for all data except BLOBs */
        mco_counter32_t     blob_pages;     /* Pages used by BLOB fields */
        mco_counter32_t     seq_pages;      /* Pages used by sequence fields */
        mco_counter_t       core_space;     /* Total bytes used, excluding BLOBs */
        mco_counter_t       blob_space;     /* Total bytes used by BLOBs */
        mco_counter_t       seq_space;      /* Total bytes used by sequences */
        mco_counter_t       extent;         /* Size of disk class extent (bytes) */
    } mco_class_stat_t, *mco_class_stat_h;
type
Structure type identifier, defined by MCO_CLSST_* flags.
objects_num
Total number of logical instances of the class.
versions_num
Number of instances including all historical versions currently stored (applicable to MVCC). In non-MVCC mode, this equals objects_num.
core_pages
Number of memory pages used for all data except BLOBs.
blob_pages
Number of memory pages used by BLOB fields.
seq_pages
Number of memory pages used by sequence fields.
core_space
Total number of bytes used by the class, excluding BLOBs.
blob_space
Total number of bytes used by BLOB fields.
seq_space
Total number of bytes used by sequence fields.
extent
Size of the disk class extent in bytes (applicable to persistent databases).

Memory usage associated with indexes is returned by mco_index_stat_get() in the mco_index_stat_t structure.

The Database Calculator returns memory statistics in the mco_cc_info_t structure, as described here.