-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: ti-srebot <[email protected]> Co-authored-by: Shenghui Wu <[email protected]>
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: SHOW ANALYZE STATUS | ||
summary: An overview of the usage of SHOW ANALYZE STATUS for the TiDB database。 | ||
category: reference | ||
--- | ||
|
||
# SHOW ANALYZE STATUS | ||
|
||
The `SHOW ANALYZE STATUS` statement shows the statistics collection tasks being executed by TiDB and a limited number of historical task records. | ||
|
||
## Synopsis | ||
|
||
**ShowStmt:** | ||
|
||
![ShowStmt](/media/sqlgram/ShowStmt.png) | ||
|
||
**ShowTargetFilterable:** | ||
|
||
![ShowTargetFilterable](/media/sqlgram/ShowTargetFilterable.png) | ||
|
||
## Examples | ||
|
||
{{< copyable "sql" >}} | ||
|
||
```sql | ||
create table t(x int, index idx(x)) partition by hash(x) partition 4; | ||
analyze table t; | ||
show analyze status; | ||
``` | ||
|
||
```sql | ||
+--------------+------------+----------------+-------------------+----------------+---------------------+----------+ | ||
| Table_schema | Table_name | Partition_name | Job_info | Processed_rows | Start_time | State | | ||
+--------------+------------+----------------+-------------------+----------------+---------------------+----------+ | ||
| test | t | p1 | analyze columns | 0 | 2020-05-25 17:23:55 | finished | | ||
| test | t | p0 | analyze columns | 0 | 2020-05-25 17:23:55 | finished | | ||
| test | t | p0 | analyze index idx | 0 | 2020-05-25 17:23:55 | finished | | ||
| test | t | p1 | analyze index idx | 0 | 2020-05-25 17:23:55 | finished | | ||
| test | t | p2 | analyze index idx | 0 | 2020-05-25 17:23:55 | finished | | ||
| test | t | p3 | analyze index idx | 0 | 2020-05-25 17:23:55 | finished | | ||
| test | t | p3 | analyze columns | 0 | 2020-05-25 17:23:55 | finished | | ||
| test | t | p2 | analyze columns | 0 | 2020-05-25 17:23:55 | finished | | ||
+--------------+------------+----------------+-------------------+----------------+---------------------+----------+ | ||
8 rows in set (0.00 sec) | ||
``` | ||
|
||
## See also | ||
|
||
* [ANALYZE_STATUS table](/system-tables/system-table-information-schema.md#analyze_status-table) |