mirror of
https://github.com/rulego/gflow-engine.git
synced 2026-12-06 08:02:05 +00:00
chore: wf_hi_task 增加流转轨迹行复合索引
This commit is contained in:
1 parent
d985f523bc
commit
fe7008323c
2 files changed
+7
-1
No files matched your search
@@ -207,7 +207,10 @@ CREATE TABLE IF NOT EXISTS wf_hi_task (
|
||||
KEY idx_hi_task_asg_status (tenant_id, assignee, status),
|
||||
KEY idx_hi_task_completed (ended_at DESC),
|
||||
KEY idx_hi_task_tenant (tenant_id),
|
||||
KEY idx_hi_task_duration (duration)
|
||||
KEY idx_hi_task_duration (duration),
|
||||
-- 流转动作轨迹行(转办/委派/归还/改派)按类型+操作人检索:已办列表的
|
||||
-- 转办人分支与详情可见性判定经此索引命中,轨迹行占比极小、选择性高
|
||||
KEY idx_hi_task_trace (task_type, created_by)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='历史任务实例表(已结束)';
|
||||
|
||||
-- 6. 任务审批意见表(任务归档后仍可读写)
|
||||
|
||||
@@ -332,6 +332,9 @@ CREATE INDEX IF NOT EXISTS idx_hi_task_asg_status ON wf_hi_task (tenant_id, assi
|
||||
CREATE INDEX IF NOT EXISTS idx_hi_task_completed ON wf_hi_task (ended_at DESC);
|
||||
CREATE INDEX IF NOT EXISTS idx_hi_task_tenant ON wf_hi_task (tenant_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_hi_task_duration ON wf_hi_task (duration);
|
||||
-- 流转动作轨迹行(转办/委派/归还/改派)按类型+操作人检索:已办列表的转办人
|
||||
-- 分支与详情可见性判定经此索引命中,轨迹行占比极小、选择性高
|
||||
CREATE INDEX IF NOT EXISTS idx_hi_task_trace ON wf_hi_task (task_type, created_by);
|
||||
|
||||
/* ------------ 注释 ------------ */
|
||||
COMMENT ON TABLE wf_hi_task IS '历史任务实例表(已结束)';
|
||||
|
||||
Reference in new issue
Block a user