Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 导入数据后 WRITTEN_BYTES 等于 0 是什么原因?
[TiDB Usage Environment] Test
[TiDB Version] 6.5.0
[Reproduction Path] sysbench import test data
[Encountered Problem: Problem Phenomenon and Impact] WRITTEN_BYTES=0, APPROXIMATE_SIZE=95M, what is the reason?
[Resource Configuration]
[Attachment: Screenshot/Log/Monitoring]
Query the size of the specified region_id in the TIKV_REGION_STATUS table, the results are as follows:
MySQL [information_schema]> SELECT * FROM tikv_region_status where region_id=188 \G
*************************** 1. row ***************************
REGION_ID: 188
START_KEY: 7480000000000000FF525F698000000000FF0000010380000000FF0041789603800000FF000002BBD8000000FD
END_KEY: 7480000000000000FF525F728000000000FF0647410000000000FA
TABLE_ID: 82
DB_NAME: sbtest
TABLE_NAME: sbtest1
IS_INDEX: 1
INDEX_ID: 1
INDEX_NAME: k_1
EPOCH_CONF_VER: 5
EPOCH_VERSION: 89
WRITTEN_BYTES: 0
READ_BYTES: 0
APPROXIMATE_SIZE: 95
APPROXIMATE_KEYS: 410870
REPLICATIONSTATUS_STATE: NULL
REPLICATIONSTATUS_STATEID: NULL
*************************** 2. row ***************************
REGION_ID: 188
START_KEY: 7480000000000000FF525F698000000000FF0000010380000000FF0041789603800000FF000002BBD8000000FD
END_KEY: 7480000000000000FF525F728000000000FF0647410000000000FA
TABLE_ID: 82
DB_NAME: sbtest
TABLE_NAME: sbtest1
IS_INDEX: 0
INDEX_ID: NULL
INDEX_NAME: NULL
EPOCH_CONF_VER: 5
EPOCH_VERSION: 89
WRITTEN_BYTES: 0
READ_BYTES: 0
APPROXIMATE_SIZE: 95
APPROXIMATE_KEYS: 410870
REPLICATIONSTATUS_STATE: NULL
REPLICATIONSTATUS_STATEID: NULL
2 rows in set (0.01 sec)
Question:
The definition of WRITTEN_BYTES
is: the amount of data (bytes) written to the Region.
But why is WRITTEN_BYTES=0 right after importing?