| | |
| | Defaults to the currently logged-in account and can not be modified. |
| | Optional. Custom ticket title. The ticket title can not exceed 200 characters. |
| | Select Lock-free structural change. A structural change refers to executing multiple change operations in a single ALTER TABLE statement to modify the database structure, such as adding new tables or modifying table columns. tip SQL commands are preferentially executed using OnlineDDL by default. |
| | Customize your ticket remarks. We recommend aligning them with your business for easier tracking. |
Database & table selection | | |
| | From the drop-down list, select the instance for which you want to create the ticket. |
| | From the drop-down list, select the database for which you want to create the ticket. |
| | Set SQL statements for lock-free structural change as needed. For more information on SQL statements supported in structural changes, refer to References. tip Lock-free structural change tickets can only contain one SQL statement. |
| | Select an execution method as required. Valid values: - Automatic execution after approval: After the ticket is approved, the SQL statement is automatically executed.
- Manually executed after approval: After the ticket is approved, the creator must manually execute the SQL statement.
- Scheduled execution after approval: After the ticket is approved, the ticket is executed at a specified time.
|
| | Set the ticket execution start time as needed. tip - When selecting Scheduled execution after approval as the Execution method, you can set the Execution start time.
- The scheduled time for structural changes must not overlap with the instance's maintenance window. For details about the maintenance window, refer to Configuring maintenance window.
|
| | Enable and set the ticket execution end time as needed. tip When Scheduled execution after approval is selected as the Execution method and an Execution start time is set, the end time must be later than the start time. |
| DDL statements are executed with priority. | When enabled, the system will prioritize Online DDL for executing changes. During the final table switching phase, if long-running transactions blocking the DDL are detected, the system will actively terminate them to ensure the successful completion of the DDL. |
| Long transaction threshold | Set the judgment time for long transactions. Transactions that run longer than this threshold are considered long transactions and will be actively terminated during the table switching phase. Value range: 1 to 10000 (unit: seconds). The default value is 3 seconds. This parameter can be configured when DDL priority execution is enabled. |
| Switch table time window | Select the table switching time as needed. You can choose Execute now or Scheduled execution to switch tables. Lock-free schema change operations may trigger table locks. It is recommended to schedule the table switching time during off-peak business hours to avoid impacting business operations. |
| | The system supports controlling the execution timing of DDL changes through a time window to avoid impact during business peak hours. - Allowed time window: Changes (table switching) are only allowed within the set time period. If the current time is outside the set range, the task will be automatically suspended and wait. Up to 5 time periods can be configured.
- Blocked time window: Changes (table switching) are prohibited within the set time period. Execution is allowed at all times except during the blocked period. This is suitable for scenarios where specific peak periods need to be avoided. Up to 5 time periods can be configured.
Table structure switching operations usually involve brief table locking. Be sure to limit them to off-peak business hours. |
| Full copy policy and size | Configure the execution method and resource consumption of the data migration phase during Online DDL as needed. Valid values: - DBW dynamic tuning(Recommend): The system automatically adjusts the amount of data copied in each batch based on real-time metrics such as current database load, table size, and disk I/O capacity. For example, it automatically increases the batch size during off-peak hours and decreases it during peak hours. This intelligent throttling mechanism ensures both efficiency and safety.
- Specify fixed size: You can manually set the number of rows to be copied in each batch. This is suitable for scenarios that require strict control over resource consumption, such as when server performance bottlenecks are known or when it is necessary to strictly align with maintenance windows.
|
| Cleanup strategy for the original table after table switching | Select the system's handling method for the original table after the specified table is successfully switched as needed. The options are as follows: - Directly delete invalid original table(Recommend): After the table switch is successful, the system will automatically delete the original table. The data in the original table will be unrecoverable. Proceed with caution. Ideal for scenarios where the new table data is verified to be correct and immediate storage space release is desired.
- Keep the invalid original table in the source database (Manual cleanup): After the table switch is successful, the original table will be renamed and retained in the source database. You must manually delete it. Ideal for scenarios where you want to retain the original table as a backup for safety, and manually clean it up after a period of observation to ensure there are no issues.
|
| Primary-standby delay threshold | Set the alarm threshold for instance primary-secondary replication delay (unit: seconds). During data copy, the system monitors the primary-secondary delay in real time. If the delay exceeds the threshold, the system automatically suspends data copy for new tables to prevent high primary database load from affecting services. After the primary/secondary delay falls below the threshold, the system automatically resumes the copy task. The default value is 3 seconds. It is recommended to adjust the value based on the sensitivity of your business to the primary database performance. If your business is extremely sensitive to latency, you can lower the value appropriately. |
| | - Timeout duration for table locking during switching: Set the lock timeout for the table switching phase as needed. Unit: seconds (s). Value range: 1 to 10. Default value: 5.
- Number of retries when switching table fails: Set the number of retries on table switching failure as needed. Value range: 1 to 30. Default value: 3.
|