Add composite database index for job_events table #189
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The job_events table queries on (job_id, timestamp) but only has individual indexes, causing poor query performance on event streaming.
Location
apps/api/prisma/migrations/20260201205935_add_job_tracking/migration.sql:88-94
Current indexes:
Query Pattern
Impact
Acceptance Criteria
Implementation
Testing
Should show index scan instead of sequential scan.
References
M4.2-Infrastructure verification report (2026-02-02)
Code review agent ID: a27cfbd