# Database Statistics

> The `mco_class_stat_get()` and `mco_index_stat_get()` APIs return memory usage statistics in the structures defined below. Also the Database Calculator can be used to determine how much memory will be used by that class at runtime, its indexes and the size of 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_counter_t objects_num;    /* Total number of instances of the class */
>             mco_counter32_t versions_num; /* Number of instances of the class including
>                                 all versions used at the moment (for MVCC) */
>             mco_counter32_t core_pages;   /* Number of pages used for all data except blobs */
>             mco_counter32_t blob_pages;   /* Number of pages used by blobs */
>             mco_counter32_t seq_pages; /* Number of pages used by sequences */
>             mco_counter_t core_space;     /* Total number of bytes, not counting blobs */
>         } mco_class_stat_t, * mco_class_stat_h;

> objects_num | Total number of instances of the class (equals versions_num for MVCC)
> versions_num | Number of instances of the class including all versions used at the moment (for MVCC)
> core_pages | Number of pages used for all data except blobs
> blob_pages | The number of pages used for blobs
> seq_pages | The number of pages used by sequences
> core_space | Total number of bytes, not counting blobs

> The 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 described here.