# Flashback Query
__*Flashback Query*__
__*Stale Read*__
+ `AS OF TIMESTAMP`:
```
tidb> INSERT INTO planets (name, mass, sun_id, category_id) VALUES ('B-612', 0.1, 7878, 1);
Query OK, 1 row affected (0.01 sec)

tidb> SELECT COUNT(*) 
    -> FROM planets ~!@AS OF TIMESTAMP NOW() - INTERVAL 60 SECOND@!~; 
+----------+
| COUNT(*) |
+----------+
|      421 |
+----------+
1 row in set (0.01 sec)

tidb> SELECT COUNT(*) FROM planets;
+----------+
| COUNT(*) |
+----------+
|      422 |
+----------+
1 row in set (0.00 sec)
```

------------------------------------------------------------
This slide describes how to perform the Stale Read (Flashback Query) feature using the AS OF TIMESTAMP clause to read historical data in TiDB.

Historical data retention is affected by system variables setting. For more information please refer: https://docs.pingcap.com/tidb/v6.0/read-historical-data


