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, 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;typeStructure type identifier, defined byMCO_CLSST_*flags.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 all data except BLOBs.blob_pagesNumber of memory pages used by BLOB fields.seq_pagesNumber of memory pages used by sequence fields.core_spaceTotal number of bytes used by the class, excluding BLOBs.blob_spaceTotal number of bytes used by BLOB fields.seq_spaceTotal number of bytes used by sequence fields.extentSize of the disk class extent in bytes (applicable to persistent databases).Memory usage associated with indexes is returned by
mco_index_stat_get()in themco_index_stat_tstructure.The Database Calculator returns memory statistics in the
mco_cc_info_tstructure, as described here.