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 for eXtremeDB/rt, which provides memory usage statistics for a class:


    typedef struct mco_class_stat_t_
    {
        mco_counter_t       objects_num;    /* Total number of instances of the class */
        mco_counter32_t     versions_num;   /* Number of instances including all versions used at the moment (for MVCC) */
        mco_counter32_t     core_pages;     /* Number of pages used for data */
        mco_counter_t       core_space;     /* Total number of bytes */
        mco_counter_t       extent;         /* Size of disk class extent (bytes) */
    } mco_class_stat_t, *mco_class_stat_h;
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 class data.
core_space
Total number of bytes used by the class.
extent
Size of the disk class extent in bytes (applicable to persistent databases).