From 5913d1081b1b51f46c980cf3e910369b338e27bc Mon Sep 17 00:00:00 2001 From: WenyXu Date: Mon, 8 Sep 2025 16:16:56 +0800 Subject: [PATCH] feat: add `written_bytes_since_open` desc --- .../information-schema/region-statistics.md | 44 ++++++++++--------- .../information-schema/region-statistics.md | 44 ++++++++++--------- 2 files changed, 46 insertions(+), 42 deletions(-) diff --git a/docs/reference/sql/information-schema/region-statistics.md b/docs/reference/sql/information-schema/region-statistics.md index bc1b00664..9e3fe970a 100644 --- a/docs/reference/sql/information-schema/region-statistics.md +++ b/docs/reference/sql/information-schema/region-statistics.md @@ -19,22 +19,23 @@ DESC REGION_STATISTICS; The output is as follows: ```sql -+---------------+--------+------+------+---------+---------------+ -| Column | Type | Key | Null | Default | Semantic Type | -+---------------+--------+------+------+---------+---------------+ -| region_id | UInt64 | | NO | | FIELD | -| table_id | UInt32 | | NO | | FIELD | -| region_number | UInt32 | | NO | | FIELD | -| region_rows | UInt64 | | YES | | FIELD | -| disk_size | UInt64 | | YES | | FIELD | -| memtable_size | UInt64 | | YES | | FIELD | -| manifest_size | UInt64 | | YES | | FIELD | -| sst_num | UInt64 | | YES | | FIELD | -| sst_size | UInt64 | | YES | | FIELD | -| index_size | UInt64 | | YES | | FIELD | -| engine | String | | YES | | FIELD | -| region_role | String | | YES | | FIELD | -+---------------+--------+------+------+---------+---------------+ ++--------------------------+--------+------+------+---------+---------------+ +| Column | Type | Key | Null | Default | Semantic Type | ++--------------------------+--------+------+------+---------+---------------+ +| region_id | UInt64 | | NO | | FIELD | +| table_id | UInt32 | | NO | | FIELD | +| region_number | UInt32 | | NO | | FIELD | +| region_rows | UInt64 | | YES | | FIELD | +| written_bytes_since_open | UInt64 | | YES | | FIELD | +| disk_size | UInt64 | | YES | | FIELD | +| memtable_size | UInt64 | | YES | | FIELD | +| manifest_size | UInt64 | | YES | | FIELD | +| sst_size | UInt64 | | YES | | FIELD | +| sst_num | UInt64 | | YES | | FIELD | +| index_size | UInt64 | | YES | | FIELD | +| engine | String | | YES | | FIELD | +| region_role | String | | YES | | FIELD | ++--------------------------+--------+------+------+---------+---------------+ ``` Fields in the `REGION_STATISTICS` table are described as follows: @@ -43,6 +44,7 @@ Fields in the `REGION_STATISTICS` table are described as follows: - `table_id`: The ID of the table. - `region_number`: The number of the region in the table. - `region_rows`: The number of rows in the region. +- `written_bytes_since_open`: The number of bytes written to the region since the region was opened. - `disk_size`: The total size of data files in the region, including data, index and metadata etc. - `memtable_size`: The region's total size of memtables. - `manifest_size`: The region's total size of manifest files. @@ -63,9 +65,9 @@ WHERE t.table_name = 'system_metrics'; Output: ```sql -+---------------+----------+---------------+-------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ -| region_id | table_id | region_number | region_rows | disk_size | memtable_size | manifest_size | sst_size | sst_num | index_size | engine | region_role | -+---------------+----------+---------------+-------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ -| 4398046511104 | 1024 | 0 | 8 | 4922 | 0 | 1338 | 3249 | 1 | 335 | mito | Leader | -+---------------+----------+---------------+-------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ ++---------------+----------+---------------+-------------+--------------------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ +| region_id | table_id | region_number | region_rows | written_bytes_since_open | disk_size | memtable_size | manifest_size | sst_size | sst_num | index_size | engine | region_role | ++---------------+----------+---------------+-------------+--------------------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ +| 4398046511104 | 1024 | 0 | 8 | 0 | 4922 | 0 | 1338 | 3249 | 1 | 335 | mito | Leader | ++---------------+----------+---------------+-------------+--------------------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ ``` \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/information-schema/region-statistics.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/information-schema/region-statistics.md index 322cd4898..7c4790d92 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/information-schema/region-statistics.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/information-schema/region-statistics.md @@ -19,22 +19,23 @@ DESC REGION_STATISTICS; 输出如下: ```sql -+---------------+--------+------+------+---------+---------------+ -| Column | Type | Key | Null | Default | Semantic Type | -+---------------+--------+------+------+---------+---------------+ -| region_id | UInt64 | | NO | | FIELD | -| table_id | UInt32 | | NO | | FIELD | -| region_number | UInt32 | | NO | | FIELD | -| region_rows | UInt64 | | YES | | FIELD | -| disk_size | UInt64 | | YES | | FIELD | -| memtable_size | UInt64 | | YES | | FIELD | -| manifest_size | UInt64 | | YES | | FIELD | -| sst_num | UInt64 | | YES | | FIELD | -| sst_size | UInt64 | | YES | | FIELD | -| index_size | UInt64 | | YES | | FIELD | -| engine | String | | YES | | FIELD | -| region_role | String | | YES | | FIELD | -+---------------+--------+------+------+---------+---------------+ ++--------------------------+--------+------+------+---------+---------------+ +| Column | Type | Key | Null | Default | Semantic Type | ++--------------------------+--------+------+------+---------+---------------+ +| region_id | UInt64 | | NO | | FIELD | +| table_id | UInt32 | | NO | | FIELD | +| region_number | UInt32 | | NO | | FIELD | +| region_rows | UInt64 | | YES | | FIELD | +| written_bytes_since_open | UInt64 | | YES | | FIELD | +| disk_size | UInt64 | | YES | | FIELD | +| memtable_size | UInt64 | | YES | | FIELD | +| manifest_size | UInt64 | | YES | | FIELD | +| sst_size | UInt64 | | YES | | FIELD | +| sst_num | UInt64 | | YES | | FIELD | +| index_size | UInt64 | | YES | | FIELD | +| engine | String | | YES | | FIELD | +| region_role | String | | YES | | FIELD | ++--------------------------+--------+------+------+---------+---------------+ ``` `REGION_STATISTICS` 表中的字段描述如下: @@ -43,6 +44,7 @@ DESC REGION_STATISTICS; - `table_id`: 表的 ID。 - `region_number`: Region 在表中的编号。 - `region_rows`: Region 中的记录行数。 +- `written_bytes_since_open`: Region 自打开以来写入的字节数。 - `disk_size`: Region 中数据文件的总大小,包括数据、索引及元信息等。 - `memtable_size`: Region 中内存 memtables 的总大小。 - `manifest_size`: Region 中元信息 manifest 文件的总大小。 @@ -61,9 +63,9 @@ WHERE t.table_name = 'system_metrics'; 输出: ```sql -+---------------+----------+---------------+-------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ -| region_id | table_id | region_number | region_rows | disk_size | memtable_size | manifest_size | sst_size | sst_num | index_size | engine | region_role | -+---------------+----------+---------------+-------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ -| 4398046511104 | 1024 | 0 | 8 | 4922 | 0 | 1338 | 3249 | 1 | 335 | mito | Leader | -+---------------+----------+---------------+-------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ ++---------------+----------+---------------+-------------+--------------------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ +| region_id | table_id | region_number | region_rows | written_bytes_since_open | disk_size | memtable_size | manifest_size | sst_size | sst_num | index_size | engine | region_role | ++---------------+----------+---------------+-------------+--------------------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ +| 4398046511104 | 1024 | 0 | 8 | 0 | 4922 | 0 | 1338 | 3249 | 1 | 335 | mito | Leader | ++---------------+----------+---------------+-------------+--------------------------+-----------+---------------+---------------+----------+---------+------------+--------+-------------+ ```