oceanbase.DBA_OB_TABLE_STAT_STALE_INFO

2025-12-02 02:50:56  Updated

Purpose

The oceanbase.DBA_OB_TABLE_STAT_STALE_INFO view displays the number of DDL operations performed on each table since the last statistics collection, and whether the current statistics are outdated.

Note

This view is introduced since OceanBase Database V4.2.0.

Columns

Column Type Nullable? Description
DATABASE_NAME varchar(128) NO The name of the database where the table resides.
TABLE_NAME varchar(128) NO The name of the table.
PARTITION_NAME varchar(128) YES The name of the partition. If the value of this column in a partitioned table is NULL, the current record is summarized at the table level.
SUBPARTITION_NAME varchar(128) YES The name of the subpartition. If the value of this column in a subpartitioned table is NULL, the current record is summarized at the table or partition level.
LAST_ANALYZED_ROWS bigint(20) YES The number of rows when statistics were collected the last time. The value NULL indicates that no statistics have been collected.
LAST_ANALYZED_TIME timestamp(6) YES The time when statistics were last collected. The value NULL indicates that no statistics have been collected.
INSERTS BIGINT(21) NO The number of rows inserted since statistics were last collected.
UPDATES BIGINT(21) NO The number of rows updated since statistics were last collected.
DELETES BIGINT(21) NO The number of rows deleted since statistics were last collected.
STALE_PERCENT BIGINT(21) NO The percentage for determining whether statistics are outdated.
IS_STALE varchar(3) NO Indicates whether statistics are outdated. Valid values:
  • YES: outdated.
    • If statistics have been collected for the table, the statistics are considered outdated if the following condition is met: LAST_ANALYZED_ROWS × STALE_PERCENT/100 > INSERTS + UPDATES + DELETES
    • If statistics have not been collected for the table, the statistics are considered outdated if the following condition is met: INSERTS + UPDATES + DELETES > 0
  • NO: not outdated.

Contact Us