DROP TABLE
renames the original database file (.ibd) to make a new temp file and returns a success. The temp file is stored in the directory specified by the innodb_async_drop_tmp_dir
parameter and is truncated in batches on the backend. The size of the file to be truncated each time is specified by the innodb_async_truncate_size
parameter. The status of the async table drop feature is controlled by the innodb_async_truncate_work_enabled
parameter.DROP TABLE
is executed, only the hard link to the file is deleted. After that, the backend thread will scan the files that need to be deleted in the hard-linked directory and automatically truncate the data file of the dropped table.innodb_async_truncate_work_enabled
parameter to ON
to enable the async mode of DROP TABLE
. The default value is OFF
.innodb_table_drop_mode
parameter to ASYNC_DROP
to enable the async mode of DROP TABLE
. The default value is SYNC_DROP
.innodb_async_truncate_size
parameter. This is not supported for MySQL 5.6.innodb_fast_ddl
parameter as instructed in FAST DDL.Parameter | Effective Immediately | Type | Default Value | Valid Values/Value Range | Description |
innodb_async_truncate_work_enabled | Yes | string | OFF | ON/OFF | Whether to drop big tables asynchronously. |
Parameter | Effective Immediately | Type | Default Value | Valid Values/Value Range | Description |
innodb_table_drop_mode | Yes | string | SYNC_DROP | SYNC_DROP/ASYNC_DROP | Whether to drop big tables asynchronously. |
innodb_async_truncate_size | Yes | int | 128 | 128–168 | The size of the file to be truncated each time on the backend after the async mode of DROP TABLE is enabled. Unit: MB. |
Parameter | Effective Immediately | Type | Default Value | Valid Values/Value Range | Description |
innodb_table_drop_mode | Yes | string | SYNC_DROP | SYNC_DROP/ASYNC_DROP | Whether to drop big tables asynchronously. |
innodb_async_truncate_size | Yes | int | 128 | 128–168 | The size of the file to be truncated each time on the backend after the async mode of DROP TABLE is enabled. Unit: MB. |
Was this page helpful?