Skip to content
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
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 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
4 changes: 4 additions & 0 deletions sql-statements/sql-statement-prepare.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ aliases: ['/docs-cn/dev/reference/sql/statements/prepare/']

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

**PrepareSQL:**

![PrepareSQL](/media/sqlgram/PrepareSQL.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 @@ -208,13 +208,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