# Data Recover Prerequisites - Gc

+ `SET GLOBAL tidb_gc_life_time = “60m”;` 

![left](./student-guide/diagram/22-GC-01-01.png)

+ Query when the GC has been cleaned
  + `SELECT * FROM mysql.tidb WHERE variable_name = 'tikv_gc_safe_point';` 

------------------------------------------------------------

In the default configuration, the GC is triggered every 10 minutes, and each GC retains the data for the last 10 minutes (i.e. the default GC life time is 10 minutes, the safe point is calculated as the current time minus the GC life time).
A prerequisite for data recover is that the safe point in time (safe point) of the data to be recover has not been dropped by the GC. You can use the following SQL statement to query the current SafePoint, which is the point in time the GC has been cleaned up:
SELECT* FROM mysql.tidb WHERE variable_name = 'tikv_gc_safe_point';

As long as the DML or DDL operation is after the tikv_gc_safe_point time, the data can theoretically be quickly recover.

So, in the event of an MVCC-based fast recover, the first action is to adjust the GC time to prevent the MVCC from being cleaned up for the target historical data to be recover:
SET GLOBAL tidb_gc_life_time="60m”;

