Commit 39a9b76097225475a509cc2d70012061fec93884

Authored by zhangmeiyang
1 parent c1cc930e

feat(storage): 添加系统数据ID和管道ID联合索引

- 在TaxPipelineMapping表中新增idx_system_data_id_pipeline_id索引
- 优化账套同步数据查询性能
- 提高系统数据与管道关联查询效率
tax-storage/src/main/resources/com/diligrp/tax/storage/repo/TaxPipelineMappingRepository.xml
... ... @@ -82,7 +82,8 @@
82 82 `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
83 83 `modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
84 84 PRIMARY KEY (`id`) USING BTREE,
85   - KEY `idx_pipeline_id_state` (`pipeline_id`, `state`) USING BTREE
  85 + KEY `idx_pipeline_id_state` (`pipeline_id`, `state`) USING BTREE,
  86 + KEY `idx_system_data_id_pipeline_id` (`pipeline_id`,`system_data_id`) USING BTREE
86 87 ) ENGINE = InnoDB
87 88 DEFAULT CHARSET = utf8mb4
88 89 COLLATE = utf8mb4_0900_ai_ci COMMENT ='账套同步数据';
... ...