Commit 0238722
authored
database: Add index to optimize background job queue processing (#11954)
This commit creates a composite index on `(priority DESC, id ASC)` to improve performance of job selection queries that order by priority and id for queue processing.
This improved the job selection query performance from roughly 800ms to 0.07ms after enqueuing all of the `analyze-crate-file` backfill background jobs.1 parent 8cae1a9 commit 0238722
File tree
3 files changed
+4
-0
lines changed- migrations/2025-09-22-090805_add_background_jobs_priority_id_index
3 files changed
+4
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments