Skip to content

Commit

Permalink
update syntax gram for kill, prepare and show stats_healthy (#2880
Browse files Browse the repository at this point in the history
)

* update syntax gram for `kill`, `prepare` and `show stats_healthy`

* Update statistics.md

Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com>
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 16, 2020
1 parent 4fdda37 commit b85dd39
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
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 @@ By design, this statement is not compatible with MySQL by default. This helps pr

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

**KillOrKillTiDB:**

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

## Examples

```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 @@ The `PREPARE` statement provides an SQL interface to server-side prepared statem

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

**PrepareSQL:**

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

## Examples

```sql
Expand Down
12 changes: 6 additions & 6 deletions statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ Currently, the `SHOW STATS_META` statement returns the following 6 columns:

You can use the `SHOW STATS_HEALTHY` statement to check the health state of tables and roughly estimate the accuracy of the statistics. When `modify_count` >= `row_count`, the health state is 0; when `modify_count` < `row_count`, the health state is (1 - `modify_count`/`row_count`) * 100.

The syntax is as follows. You can use `ShowLikeOrWhere` to filter the information you need:
The synopsis of `SHOW STATS_HEALTHY` is:

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

```sql
SHOW STATS_HEALTHY [ShowLikeOrWhere];
```
and the synopsis of the `ShowLikeOrWhereOpt` part is:

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

Currently, the `SHOW STATS_HEALTHY` statement returns the following 4 columns:

Expand Down Expand Up @@ -312,4 +312,4 @@ Syntax:
LOAD STATS 'file_name'
```
`file_name` is the file name of the statistics to be imported.
`file_name` is the file name of the statistics to be imported.

0 comments on commit b85dd39

Please sign in to comment.