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

update syntax gram for kill, prepare and show stats_healthy #3319

Merged
merged 5 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
update syntax gram for kill and show stats_healthy
  • Loading branch information
eurekaka committed May 25, 2020
commit bf3890ed26d0a6b9fd4e9f05b43251c2c0b405a4
Binary file modified media/sqlgram/KillOrKillTiDB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/sqlgram/KillStmt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/sqlgram/ShowLikeOrWhereOpt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/sqlgram/ShowStatsHealthy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions sql-statements/sql-statement-kill.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ aliases: ['/docs-cn/dev/reference/sql/statements/kill/']

![KillStmt](/media/sqlgram/KillStmt.png)

**KillOrKillTiDB:**

![KillOrKillTiDB](/media/sqlgram/KillOrKillTiDB.png)

## 示例

{{< copyable "sql" >}}
Expand Down
10 changes: 5 additions & 5 deletions statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ SHOW STATS_META [ShowLikeOrWhere];

通过 `SHOW STATS_HEALTHY` 可以查看表的统计信息健康度,并粗略估计表上统计信息的准确度。当 `modify_count` >= `row_count` 时,健康度为 0;当 `modify_count` < `row_count` 时,健康度为 (1 - `modify_count`/`row_count`) * 100。

通过以下命令来查看表的统计信息健康度,你可以通过 `ShowLikeOrWhere` 来筛选需要的信息
`SHOW STATS_HEALTHY` 的语法图为

{{< copyable "sql" >}}
![ShowStatsHealthy](/media/sqlgram/ShowStatsHealthy.png)

```sql
SHOW STATS_HEALTHY [ShowLikeOrWhere];
```
其中,`ShowLikeOrWhereOpt` 部分的语法图为:

![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png)

目前,`SHOW STATS_HEALTHY` 会输出 4 列,具体如下:

Expand Down