You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From #57631 (comment), we'll see that TiDB reads all the stats_meta whose last_update_version is higher than the given timestamp.
And it's not the end. It will then call TableStatsFromStorage for every table_id read from stats_meta and read all the things from mysql.stats_histogram, mysql.stats_top_n and mysql.stats_buckets.
It's a big waste since most of the tables are just updating the row count and modified_count and rare of them will be analyzed.
We need a more accurate control for the background worker to only read the things really needed to update the in-memory stats objects.
The text was updated successfully, but these errors were encountered:
Enhancement
From #57631 (comment), we'll see that TiDB reads all the stats_meta whose last_update_version is higher than the given timestamp.
And it's not the end. It will then call
TableStatsFromStorage
for every table_id read from stats_meta and read all the things frommysql.stats_histogram
,mysql.stats_top_n
andmysql.stats_buckets
.It's a big waste since most of the tables are just updating the row count and modified_count and rare of them will be analyzed.
We need a more accurate control for the background worker to only read the things really needed to update the in-memory stats objects.
The text was updated successfully, but these errors were encountered: