[TiDB Usage Environment] Online
[TiDB Version] 5.7.25-TiDB-v5.1.0
[Encountered Problem]
[Reproduction Path]
[Problem Phenomenon and Impact]
Slow query tracking shows slow statements. Is it normal to have so many visible versions? How can we reduce the number of visible versions? Based on the data volume, there shouldn’t be this many versions.
I have also learned that there are a large number of read operations in the business, but only a small number of write operations, which are not enough to trigger compaction. Since the compaction filter is enabled by default, without compaction, expired MVCC data cannot be deleted. Therefore, multiple MVCC versions of the data always exist, causing each read operation to have to read and skip these data.
There are a large number of read operations in the business, but only a small amount of write operations, which are not enough to trigger compaction. Since the compaction filter is enabled by default, without compaction, expired MVCC data cannot be deleted. Therefore, multiple MVCC versions of the data always exist, causing each read operation to read and skip these data.