Issues with Cleaning Historical Data in Tables

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

Original topic: 表历史数据清理问题

| username: HACK

【TiDB Usage Environment】Production\Test Environment\POC
【TiDB Version】
【Encountered Problem】
If a table undergoes a large number of update and delete operations, and I drop and recreate this table, will the corresponding original MVCC data no longer exist?

【Reproduction Path】What operations were performed to encounter the problem
【Problem Phenomenon and Impact】
【Attachments】

  • Relevant logs, configuration files, Grafana monitoring (https://metricstool.pingcap.com/)
  • TiUP Cluster Display information
  • TiUP Cluster Edit config information
  • TiDB-Overview monitoring
  • Corresponding module Grafana monitoring (if any, such as BR, TiDB-binlog, TiCDC, etc.)
  • Corresponding module logs (including logs one hour before and after the problem)

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.

| username: ddhe9527 | Original post link

I understand that after dropping and then recreating the table, they are completely different tables with different table_ids. The MVCC data of the previously dropped table should still exist before GC and will only be cleaned up after Delete Ranges.

| username: xfworld | Original post link

Refer to this one~ :100:

| username: HACK | Original post link

Got it!

| username: HACK | Original post link

:+1::+1::+1:

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.