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

faq, sql: update wording and add a new parameter #920

Merged
merged 5 commits into from
Oct 17, 2018
Merged

faq, sql: update wording and add a new parameter #920

merged 5 commits into from
Oct 17, 2018

Conversation

CaitinChen
Copy link
Contributor

FAQ.md Outdated
@@ -510,7 +510,7 @@ TiDB 在执行 SQL 时,预估出来每个 operator 处理了超过 10000 条

#### 3.3.10 在 TiDB 中如何控制或改变 SQL 提交的执行优先级?

TiDB 中高优先级和低优先级的语法元素如下
TiDB 支持改变[单个会话](sql/tidb-specific.md#tidb_force_priority)、[全局](sql/server-command-option.md#force-priority)或[单个语句](sql/dml.md)的优先级。优先级包括
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

单个会话 -> per-session (To avoid misunderstanding, please keep the English expression.)


- 语句的默认优先级
- 默认: `NO_PRIORITY`
- TiDB 支持的语句优先级包括:`LOW_PRIORITY`、`NO_PRIORITY`、`HIGH_PRIORITY` 以及 `DELAYED`。可选择将一部分服务器用于处理 OLAP 查询,并将该值设置为 `LOW_PRIORITY`,以确保 TiKV 服务器优先处理要导入到其他 TiDB 服务器的 OLTP 查询。这有利于确保 OLTP 性能更稳定,但 OLAP 性能可能会稍有下降。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the last two sentences to:

例如,如果你需要为 OLAP 查询指定专属服务器池,可将该值设置为 LOW_PRIORITY,以保证 TiKV 服务器优先处理其他 TiDB 服务器池收到的 OLTP 请求。这样可以使 OLTP 性能更稳定,但 OLAP 性能可能会稍有下降。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里最好顺序跟英文版保持一致。NO_PRIORITY | LOW_PRIORITY | DELAYED | HIGH_PRIORITY
这个 NO 是默认值,意思是不生效,放在了最前面,后面三个分别对应高中低三个级别,名字是跟 MySQL 保持了一致。

- 语句的默认优先级
- 默认: `NO_PRIORITY`
- TiDB 支持的语句优先级包括:`LOW_PRIORITY`、`NO_PRIORITY`、`HIGH_PRIORITY` 以及 `DELAYED`。可选择将一部分服务器用于处理 OLAP 查询,并将该值设置为 `LOW_PRIORITY`,以确保 TiKV 服务器优先处理要导入到其他 TiDB 服务器的 OLTP 查询。这有利于确保 OLTP 性能更稳定,但 OLAP 性能可能会稍有下降。
- TiDB 自动将 table scan 设置为 `LOW_PRIORITY`, 通过将 [DML modifier](dml.md) 设置为 `HIGH PRIORITY` 或 `LOW PRIORITY`,可重写一条语句的优先级
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the extra space before "通过".


这个变量用于改变 TiDB server 上执行的语句的默认优先级。可确保正在执行 OLAP 查询的用户优先级低于正在执行 OLTP 查询的用户。

可设置为 `PRIORITY_LOW`、`NO_PRIORITY` 或 `PRIORITY_HIGH`。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values are incorrect. Please check the English version.


默认值:`NO_PRIORITY`

这个变量用于改变 TiDB server 上执行的语句的默认优先级。可确保正在执行 OLAP 查询的用户优先级低于正在执行 OLTP 查询的用户。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last sentence is inappropriate. It's only one use case. Update it to:

例如,你可以通过设置该变量来确保正在执行……

@CaitinChen
Copy link
Contributor Author

@jackysp @lilin90 Thanks! PTAL again.

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CaitinChen
Copy link
Contributor Author

@lilin90 PTAL again.

Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lilin90 lilin90 merged commit 02469f2 into pingcap:master Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants