perf(db): indexes on audit_events and worker_jobs for processing-summary #514

Merged
chris merged 1 commit from fix/processing-summary-indexes into main 2026-07-04 23:37:32 +02:00
Owner

Summary

Add Flyway migration V100 with two composite indexes to fix slow GET /api/processing-summary.

Indexes added

  • idx_audit_events_subject_type_id_event_type — speeds up resetCutoff() MAX(created_at) query filtering on subject_type, subject_id, event_type
  • idx_worker_jobs_job_type_media_status_updated — speeds up activity aggregate queries and discovery join on worker_jobs

Files changed

  • apps/api/src/main/resources/db/migration/V100__add_processing_summary_indexes.sql (new)
  • gradle.properties — version bump 0.71 → 0.72
## Summary Add Flyway migration V100 with two composite indexes to fix slow `GET /api/processing-summary`. ### Indexes added - `idx_audit_events_subject_type_id_event_type` — speeds up `resetCutoff()` MAX(created_at) query filtering on subject_type, subject_id, event_type - `idx_worker_jobs_job_type_media_status_updated` — speeds up activity aggregate queries and discovery join on worker_jobs ### Files changed - `apps/api/src/main/resources/db/migration/V100__add_processing_summary_indexes.sql` (new) - `gradle.properties` — version bump 0.71 → 0.72
perf(db): indexes on audit_events and worker_jobs for processing-summary
All checks were successful
Build and Deploy / Detect changed services and test scopes (push) Successful in 1m27s
Build and Deploy / Run scoped PR tests (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
2f4fd2f328
Add V100 migration with two composite indexes:
- idx_audit_events_subject_type_id_event_type: speeds up resetCutoff() MAX(created_at)
- idx_worker_jobs_job_type_media_status_updated: speeds up activity aggregate queries

Bump version to 0.72.
chris merged commit 694904fcc3 into main 2026-07-04 23:37:32 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!514
No description provided.