to issue/#8826 (#8827)

Co-authored-by: ouyangyewei <yewei.oyyw@alibaba-inc.com>
This commit is contained in:
ouyangyewei 2022-03-13 08:39:05 +08:00 committed by GitHub
parent 90f9aed11d
commit b0ffec5a4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 1 deletions

View File

@ -285,7 +285,8 @@ CREATE TABLE `t_ds_alert` (
`alertgroup_id` int(11) DEFAULT NULL COMMENT 'alert group id',
`create_time` datetime DEFAULT NULL COMMENT 'create time',
`update_time` datetime DEFAULT NULL COMMENT 'update time',
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
KEY `idx_status` (`alert_status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
-- ----------------------------

View File

@ -217,6 +217,8 @@ CREATE TABLE t_ds_alert (
PRIMARY KEY (id)
) ;
create index idx_status on t_ds_alert (alert_status);
--
-- Table structure for table t_ds_alertgroup
--

View File

@ -31,6 +31,8 @@ alter table t_ds_task_definition add `task_group_priority` int(11) DEFAULT '0' C
ALTER TABLE `t_ds_user` ADD COLUMN `time_zone` varchar(32) DEFAULT NULL COMMENT 'time zone';
ALTER TABLE `t_ds_alert` ADD INDEX `idx_status` (`alert_status`) USING BTREE;
--
-- Table structure for table `t_ds_dq_comparison_type`
--

View File

@ -156,6 +156,9 @@ EXECUTE 'CREATE TABLE IF NOT EXISTS' || quote_ident(v_schema) ||'."t_ds_relation
CONSTRAINT t_ds_relation_rule_input_entry_pk PRIMARY KEY (id)
)';
EXECUTE 'DROP INDEX IF EXISTS "idx_alert_status"';
EXECUTE 'CREATE INDEX IF NOT EXISTS idx_alert_status ON ' || quote_ident(v_schema) ||'.t_ds_alert USING Btree("alert_status")';
EXECUTE 'DROP INDEX IF EXISTS "idx_task_definition_log_project_code"';
EXECUTE 'CREATE INDEX IF NOT EXISTS idx_task_definition_log_project_code ON ' || quote_ident(v_schema) ||'.t_ds_task_definition_log USING Btree("project_code")';