E.9 MON$TABLE_STATS

MON$TABLE_STATS reports table-level statistics.

Column NameData TypeDescription

MON$STAT_ID

INTEGER

Statistics identifier

MON$STAT_GROUP

SMALLINT

Statistics group:

0 - database 1 - connection 2 - transaction 3 - statement 4 - call

MON$TABLE_NAME

CHAR(63)

Name of the table

MON$RECORD_STAT_ID

INTEGER

Link to MON$RECORD_STATS

Getting statistics at the record level for each table for the current connection

  1. SELECT
  2. t.mon$table_name,
  3. r.mon$record_inserts,
  4. r.mon$record_updates,
  5. r.mon$record_deletes,
  6. r.mon$record_backouts,
  7. r.mon$record_purges,
  8. r.mon$record_expunges,
  9. ------------------------
  10. r.mon$record_seq_reads,
  11. r.mon$record_idx_reads,
  12. r.mon$record_rpt_reads,
  13. r.mon$backversion_reads,
  14. r.mon$fragment_reads,
  15. ------------------------
  16. r.mon$record_locks,
  17. r.mon$record_waits,
  18. r.mon$record_conflicts,
  19. ------------------------
  20. a.mon$stat_id
  21. FROM mon$record_stats r
  22. JOIN mon$table_stats t ON r.mon$stat_id = t.mon$record_stat_id
  23. JOIN mon$attachments a ON t.mon$stat_id = a.mon$stat_id
  24. WHERE a.mon$attachment_id = CURRENT_CONNECTION