Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,8 @@ CREATE TABLE t_ds_workflow_instance
var_pool longtext,
dry_run int NULL DEFAULT 0,
restart_time datetime DEFAULT NULL,
PRIMARY KEY (id)
PRIMARY KEY (id),
INDEX idx_project_start_time (project_code ASC, start_time DESC)
);

-- ----------------------------
Expand Down Expand Up @@ -936,9 +937,9 @@ CREATE TABLE t_ds_task_instance
dry_run int NULL DEFAULT 0,
cpu_quota int(11) DEFAULT '-1' NOT NULL,
memory_max int(11) DEFAULT '-1' NOT NULL,
PRIMARY KEY (id)
PRIMARY KEY (id),
INDEX idx_project_submit_time (project_code ASC, submit_time DESC)
);
CREATE INDEX idx_project_submit_time ON t_ds_task_instance (project_code, submit_time);

-- ----------------------------
-- Records of t_ds_task_instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,8 @@ CREATE TABLE `t_ds_workflow_instance` (
`restart_time` datetime DEFAULT NULL COMMENT 'workflow instance restart time',
PRIMARY KEY (`id`),
KEY `workflow_instance_index` (`workflow_definition_code`,`id`) USING BTREE,
KEY `start_time_index` (`start_time`,`end_time`) USING BTREE
KEY `start_time_index` (`start_time`,`end_time`) USING BTREE,
KEY `idx_project_start_time` (`project_code` ASC, `start_time` DESC) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE = utf8_bin;

-- ----------------------------
Expand Down Expand Up @@ -938,7 +939,7 @@ CREATE TABLE `t_ds_task_instance` (
PRIMARY KEY (`id`),
KEY `workflow_instance_id` (`workflow_instance_id`) USING BTREE,
KEY `idx_code_version` (`task_code`, `task_definition_version`) USING BTREE,
KEY `idx_project_submit_time` (`project_code`, `submit_time`) USING BTREE
KEY `idx_project_submit_time` (`project_code` ASC, `submit_time` DESC) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE = utf8_bin;

-- ----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ CREATE TABLE t_ds_workflow_instance (

create index workflow_instance_index on t_ds_workflow_instance (workflow_definition_code,id);
create index start_time_index on t_ds_workflow_instance (start_time,end_time);
create index idx_project_start_time on t_ds_workflow_instance (project_code ASC, start_time DESC);

--
-- Table structure for table t_ds_project
Expand Down Expand Up @@ -859,7 +860,7 @@ CREATE TABLE t_ds_task_instance (
) ;

create index idx_task_instance_code_version on t_ds_task_instance (task_code, task_definition_version);
create index idx_project_submit_time on t_ds_task_instance (project_code, submit_time DESC);
create index idx_project_submit_time on t_ds_task_instance (project_code ASC, submit_time DESC);

--
-- Table structure for t_ds_task_instance_context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
*/

ALTER TABLE `t_ds_task_instance` ADD INDEX idx_project_submit_time (project_code ASC, submit_time DESC);
ALTER TABLE `t_ds_workflow_instance` ADD INDEX idx_project_start_time (project_code ASC, start_time DESC);

Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

CREATE INDEX idx_project_submit_time ON t_ds_task_instance (project_code ASC, submit_time DESC);
CREATE INDEX idx_project_start_time ON t_ds_workflow_instance (project_code ASC, start_time DESC);
Loading