Skip to content

Commit

Permalink
faq: add details of watching DDL job progress (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilin90 authored and zimulala committed Dec 13, 2018
1 parent 5360242 commit 679305a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions FAQ.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -913,9 +913,20 @@ Recommendations:
3. Test the `count` in the case of large amount of data. 3. Test the `count` in the case of large amount of data.
4. Optimize the TiKV configuration. See [Performance Tuning for TiKV](op-guide/tune-tikv.md). 4. Optimize the TiKV configuration. See [Performance Tuning for TiKV](op-guide/tune-tikv.md).
#### How to view the progress of adding an index? #### How to view the progress of the current DDL job?
Use `admin show ddl` to view the current job of adding an index. You can use `admin show ddl` to view the progress of the current DDL job. The operation is as follows:
```sql
tidb> admin show ddl\G;
*************************** 1. row ***************************
SCHEMA_VER: 140
OWNER: 1a1c4174-0fcd-4ba0-add9-12d08c4077dc
RUNNING_JOBS: ID:121, Type:add index, State:running, SchemaState:write reorganization, SchemaID:1, TableID:118, RowCount:77312, ArgLen:0, start time: 2018-12-05 16:26:10.652 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:404749908941733890
SELF_ID: 1a1c4174-0fcd-4ba0-add9-12d08c4077dc
```
From the above results, you can get that the `add index` operation is being processed currently. You can also get from the `RowCount` field of the `RUNNING_JOBS` column that now the `add index` operation has added 77312 rows of indexes.
#### How to view the DDL job? #### How to view the DDL job?
Expand Down

0 comments on commit 679305a

Please sign in to comment.