Skip to content

Commit

Permalink
[Improvement] ams-mysql-init.sql fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mansonliwh committed Sep 23, 2024
1 parent 3f627ec commit e5eacd2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions amoro-ams/src/main/resources/mysql/ams-mysql-init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ CREATE TABLE `table_runtime`
`last_major_optimizing_time` timestamp NULL DEFAULT NULL COMMENT 'Latest Major Optimize time for all partitions',
`last_minor_optimizing_time` timestamp NULL DEFAULT NULL COMMENT 'Latest Minor Optimize time for all partitions',
`last_full_optimizing_time` timestamp NULL DEFAULT NULL COMMENT 'Latest Full Optimize time for all partitions',
`optimizing_status_code` int DEFAULT 700 COMMENT 'Table optimize status code: 100(FULL_OPTIMIZING),' ||
' 200(MAJOR_OPTIMIZING), 300(MINOR_OPTIMIZING), 400(COMMITTING), 500(PLANING), 600(PENDING), 700(IDLE)',
`optimizing_status_code` int DEFAULT 700 COMMENT 'Table optimize status code: 100(FULL_OPTIMIZING), 200(MAJOR_OPTIMIZING), 300(MINOR_OPTIMIZING), 400(COMMITTING), 500(PLANING), 600(PENDING), 700(IDLE)',
`optimizing_status_start_time` timestamp default CURRENT_TIMESTAMP COMMENT 'Table optimize status start time',
`optimizing_process_id` bigint(20) NOT NULL COMMENT 'optimizing_procedure UUID',
`optimizer_group` varchar(64) NOT NULL,
Expand All @@ -132,8 +131,8 @@ CREATE TABLE `table_runtime`
`pending_input` mediumtext,
`table_summary` mediumtext,
PRIMARY KEY (`table_id`),
UNIQUE KEY `table_index` (`catalog_name`,`db_name`,`table_name`)
INDEX idx_optimizer_status_and_time (optimizing_status_code, optimizing_status_start_time DESC);
UNIQUE KEY `table_index` (`catalog_name`,`db_name`,`table_name`),
INDEX idx_optimizer_status_and_time (optimizing_status_code, optimizing_status_start_time DESC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT 'Optimize running information of each table' ROW_FORMAT=DYNAMIC;

CREATE TABLE `table_optimizing_process`
Expand Down

0 comments on commit e5eacd2

Please sign in to comment.