Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-guide, sql: update doc after tso support merged into tidb #757

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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