pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.07k stars 5.83k forks source link

Fill the TABLE_ROWS field of information_schema.TABLES with the information from statistics #6063

Closed shenli closed 6 years ago

shenli commented 6 years ago

We have updated row_count in the statistics. So we could use it to fill the result of INFORMATION_SCHEMA.TABLES.

dreamquster commented 6 years ago

INFORMATION_SCHEMA.TABLES count all rows in table. statitics.handle record the delta change in mysql.stats_meta, but it doesn't count delta change caused by DELETE statements. Where can I find correct row_count?

alivxxx commented 6 years ago

@dreamquster It counts the delta caused by delete statement. Did you find bugs?

dreamquster commented 6 years ago

I'm sorry. Maybe it's caused by unexpected interruption. I'll fill the row_count with the value queried from myql.stats_meta.