The
mco_class_stat_get()andmco_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_tstructure 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_numTotal number of logical instances of the class.versions_numNumber of instances including all historical versions currently stored (applicable to MVCC). In non-MVCC mode, this equalsobjects_num.core_pagesNumber of memory pages used for class data.core_spaceTotal number of bytes used by the class.extentSize of the disk class extent in bytes (applicable to persistent databases).