【TiDB Usage Environment】Production\Test Environment\POC
【TiDB Version】
【Encountered Issues】
【Reproduction Path】What operations were performed to encounter the issue
【Issue Phenomenon and Impact】
【Attachments】
Corresponding module’s Grafana monitoring (if any, such as BR, TiDB-binlog, TiCDC, etc.)
Corresponding module logs (including logs from 1 hour before and after the issue)
If the question is related to performance optimization or troubleshooting, please download the script and run it. Please select all and copy-paste the terminal output results for upload.
Calculating the size of a specific database alone doesn’t seem to have a good method at the moment. It is relatively estimated for judgment, and there is no specific accurate algorithm. Only the size of the entire database and individual TiKV can be viewed through monitoring.
First, manually collect the statistics, then use the following syntax to check the estimated size of the specified database:
select table_schema, sum(data_length)/1024/1024 as data_length, sum(index_length)/1024/1024 as index_length, sum(data_length+index_length)/1024/1024 as sum from information_schema.tables where table_schema = "$table_name" group by table_schema;
The specific values should be based on the monitoring data.