Skip to content

Commit

Permalink
add notice for now usage in stale read (#13480)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreoxmt authored May 9, 2023
1 parent 8e43073 commit 3dc08ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion develop/dev-guide-use-stale-read.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ In addition to specifying an exact time, you can also specify the following:
- `AS OF TIMESTAMP TIDB_BOUNDED_STALENESS('2016-10-08 16:45:26', '2016-10-08 16:45:29')` queries the latest data between `2016-10-08 16:45:26` and `2016-10-08 16:45:29`.
- `AS OF TIMESTAMP TIDB_BOUNDED_STALENESS(NOW() -INTERVAL 20 SECOND, NOW())` queries the latest data within 20 seconds.

Note that the specified timestamp or interval cannot be too early or later than the current time.
Note that the specified timestamp or interval cannot be too early or later than the current time. Additionally, `NOW()` defaults to second precision. To achieve higher precision, you can add a parameter, such as using `NOW(3)` for millisecond precision. For more information, see [MySQL documentation](https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_now).

Expired data will be recycled by [Garbage Collection](/garbage-collection-overview.md) in TiDB, and the data will be retained for a short period before being cleared. The period is called [GC Life Time (default 10 minutes)](/system-variables.md#tidb_gc_life_time-new-in-v50). When a GC starts, the current time minus the time period will be used as the **GC Safe Point**. If you try to read the data before GC Safe Point, TiDB will report the following error:

Expand Down

0 comments on commit 3dc08ee

Please sign in to comment.