Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

information-schema: add the description about hot region statistical cycle #16349

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ The fields in the `TIDB_HOT_REGIONS_HISTORY` table are described as follows:
* KEY_RATE: The number of keys written and read in the Region.
* QUERY_RATE: The number of queries written and read in the Region.

For read hot Regions, the reference period of the `FLOW_BYTES`, `KEY_RATE`, and `QUERY_RATE` fields is a store heartbeat cycle, which is controlled by the TiKV configuration item [`pd-store-heartbeat-tick-interval`](/tikv-configuration-file.md#pd-store-heartbeat-tick-interval). For write hot Regions, the reference period of the `QUERY_RATE` field still uses the store heartbeat cycle, and the reference period of the `FLOW_BYTES` and `KEY_RATE` fields is a Region heartbeat cycle, which is controlled by the TiKV configuration item [`pd-heartbeat-tick-interval`](/tikv-configuration-file.md#pd-heartbeat-tick-interval).

> **Note:**
>
> `UPDATE_TIME`, `REGION_ID`, `STORE_ID`, `PEER_ID`, `IS_LEARNER`, `IS_LEADER` and `TYPE` fields are pushed down to the PD servers for execution. To reduce the overhead of using the table, you must specify the time range for the search, and specify as many conditions as possible. For example, `select * from tidb_hot_regions_history where store_id = 11 and update_time > '2020-05-18 20:40:00' and update_time < '2020-05-18 21:40:00' and type='write'`.
Expand Down
2 changes: 2 additions & 0 deletions information-schema/information-schema-tidb-hot-regions.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ The description of columns in the `TIDB_HOT_REGIONS` table is as follows:
* `MAX_HOT_DEGREE`: The maximum hot degree of the Region.
* `REGION_COUNT`: The number of hot Regions in the instance.
* `FLOW_BYTES`: The number of bytes written and read in the Region.

For read hot Regions, the reference period of the `FLOW_BYTES` field is a store heartbeat cycle, which is controlled by the TiKV configuration item [`pd-store-heartbeat-tick-interval`](/tikv-configuration-file.md#pd-store-heartbeat-tick-interval). For write hot Regions, the reference period of the `FLOW_BYTES` field is a Region heartbeat cycle, which is controlled by the TiKV configuration item [`pd-heartbeat-tick-interval`](/tikv-configuration-file.md#pd-heartbeat-tick-interval).
Loading