Too Many Visible Versions

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 可见版本太多

| username: Kongdom

[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.



[Attachment]

| username: h5n1 | Original post link

It should be a bug, compaction was not triggered.

| username: xiaohetao | Original post link

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.

| username: Kongdom | Original post link

:rofl: The ultimate answer to all problems–upgrade

| username: Kongdom | Original post link

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.

| username: alfred | Original post link

Got it, small write operations are also normal business requirements.

| username: Kongdom | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.