修复小额打款工单关联未命中组合索引 #135

Merged
WuYongJie merged 1 commits from fix/WuYongJie-small-payment-join into main 2026-09-09 10:53:53 +08:00
Owner

小额打款已具备 (woTypeId,woNo,Id) 索引,但关联只约束 Id 和类型,生产执行计划逐次扫描同类型大量工单。补充同一工单号等值条件,让关联使用组合索引前两列,保留按工单号取最新 Id 的口径。8 tests / 68 assertions 通过;生产只读条件对照统计约 2.26 秒,原查询超过 20 秒。无迁移或新索引。

小额打款已具备 (woTypeId,woNo,Id) 索引,但关联只约束 Id 和类型,生产执行计划逐次扫描同类型大量工单。补充同一工单号等值条件,让关联使用组合索引前两列,保留按工单号取最新 Id 的口径。8 tests / 68 assertions 通过;生产只读条件对照统计约 2.26 秒,原查询超过 20 秒。无迁移或新索引。
WuYongJie added 1 commit 2026-09-09 10:53:11 +08:00
WuYongJie merged commit a50b7596e8 into main 2026-09-09 10:53:53 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WuYongJie/CaiWuXiTong#135
No description provided.