The processing time is different for different scenarios. Generally, you can consider the following three scenarios:
- The
Add Index
operation with a relatively small number of rows in the corresponding data table: about 3s - The
Add Index
operation with a relatively large number of rows in the corresponding data table: the processing time depends on the specific number of rows and the QPS at that time (theAdd Index
operation has a lower priority than ordinary SQL operations) - Other DDL operations: about 1s
If the TiDB server instance that receives the DDL request is the same TiDB server instance that the DDL owner is in, the first and third scenarios above may cost only dozens to hundreds of milliseconds.