perf: optimize worker order query hot paths

This commit is contained in:
yml2213
2026-08-30 15:30:46 +08:00
parent 7b9794665c
commit 79d8f84ac9
3 changed files with 71 additions and 44 deletions
+9
View File
@@ -45,6 +45,15 @@ const checks: Array<{ name: string; file: string; patterns: string[] }> = [
'DROP INDEX IF EXISTS idx_work_product_match_logs_created_at',
],
},
{
name: '打手超时事件统计索引',
file: path.join(BACKEND_ROOT, 'src/db/migrations/068_timeout_event_worker_index.sql'),
patterns: [
'idx_work_order_events_timeout_worker_id',
"payload_json->>'workerId'",
"WHERE event_type LIKE 'timeout_%'",
],
},
]
const failures: string[] = []