Skip to content

Commit

Permalink
update doc after tso support merged into tidb (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhexuany authored and shenli committed Jun 11, 2018
1 parent b97b38e commit 6279dcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion op-guide/history-read.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TiDB 实现了通过标准 SQL 接口读取历史数据功能,无需特殊的

## 操作流程

为支持读取历史版本数据, 引入了一个新的 system variable: tidb_snapshot ,这个变量是 Session 范围有效,可以通过标准的 Set 语句修改其值。其值为文本,记录了时间,格式为
为支持读取历史版本数据, 引入了一个新的 system variable: tidb_snapshot ,这个变量是 Session 范围有效,可以通过标准的 Set 语句修改其值。其值为文本,能够存储 TSO 和日期时间。TSO 即是全局授时的时间戳,是从 PD 端获取的; 日期时间的格式可以为
“2016-10-08 16:45:26.999”,一般来说可以只写到秒,比如”2016-10-08 16:45:26”。
当这个变量被设置时,TiDB 会用这个时间戳建立 Snapshot(没有开销,只是创建数据结构),随后所有的 Select 操作都会在这个 Snapshot 上读取数据。

Expand Down
2 changes: 1 addition & 1 deletion sql/tidb-specific.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TiDB 在 MySQL 的基础上,定义了一些专用的系统变量和语法用
默认值: 空字符串

这个变量用来设置当前会话期待读取的历史数据所处时刻。
比如当设置为 "2017-11-11 20:20:20" ,当前会话将能读取到该时刻的数据。
比如当设置为 "2017-11-11 20:20:20" 时或者一个 TSO 数字 "400036290571534337",当前会话将能读取到该时刻的数据。

### tidb_import_data

Expand Down

0 comments on commit 6279dcb

Please sign in to comment.