説明
このビューは、V4.0.0バージョンから導入されました。
機能の概要
現在のテナントのすべてのテーブルの統計履歴を表示します。
フィールドの説明
| フィールド名 | タイプ | NULLを許容するか | 説明 |
|---|---|---|---|
| OWNER | varchar(128) | NO | オブジェクトの所有者 |
| TABLE_NAME | varchar(128) | NO | テーブル名 |
| PARTITION_NAME | varchar(128) | NO | パーティションテーブル名 |
| SUBPARTITION_NAME | varchar(128) | NO | サブパーティションテーブル名 |
| STATS_UPDATE_TIME | datetime(6) | NO | 統計データの更新時間 |
クエリ例
このテナント内のテーブルt_subpartの統計変更履歴を確認します。
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_TAB_STATS_HISTORY WHERE TABLE_NAME='t_subpart';
クエリ結果は次のとおりです:
+-------+---------------+----------------+-------------------+----------------------------+
| OWNER | TABLE_NAME | PARTITION_NAME | SUBPARTITION_NAME | STATS_UPDATE_TIME |
+-------+---------------+----------------+-------------------+----------------------------+
| test | t_subpart | NULL | NULL | 2025-03-21 15:23:11.884679 |
| test | t_subpart | NULL | NULL | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2023 | NULL | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2023 | NULL | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2024 | NULL | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2024 | NULL | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p_max | NULL | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2023 | p2023sp0 | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2023 | p2023sp0 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2023 | p2023sp1 | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2023 | p2023sp1 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2023 | p2023sp2 | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2023 | p2023sp2 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2023 | p2023sp3 | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2023 | p2023sp3 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2024 | p2024sp0 | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2024 | p2024sp0 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2024 | p2024sp1 | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2024 | p2024sp1 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2024 | p2024sp2 | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2024 | p2024sp2 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p2024 | p2024sp3 | 2025-03-21 15:23:11.884679 |
| test | t_subpart | p2024 | p2024sp3 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p_max | p_maxsp0 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p_max | p_maxsp1 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p_max | p_maxsp2 | 2025-03-21 16:21:09.868166 |
| test | t_subpart | p_max | p_maxsp3 | 2025-03-21 16:21:09.868166 |
+-------+---------------+----------------+-------------------+----------------------------+
27 rows in set