tibdg Table Stats

Run the tibdg table stats <table-name> command to view statistics such as row counts or overall table size for a table and all of its indexes.

The following is an example that shows statistics for a table named t1:
$ tibdg table stats t1
Table 't1' statistics:
  Rows:  10  (exact)  
  Size by Index:
    primary: 103.0B (exact)

In this example, t1 contains 10 rows. The (exact) after the row count indicates that this is an exact count. The table has one index named primary that takes up 103 bytes of space which is also exact. The size reported for the primary index is the size of data in all of the rows in the table, which includes all the data for the primary index. The size reported for a secondary index is the additional data size of that index. The total data size for a given table, is the sum of the sizes of all its indexes.

The sizes reported by this command are the sizes of the uncompressed data, so they might not reflect the disk usage for the table due to other factors such as compression of the data when it is written to the disk.

If a table or index does not have statistics enabled, the values for row count and sizes is 0, and (off) is displayed next to the values. See Enabling Statistics to set the row_counts attribute during table or index create to exact.