Skip to content

Commit

Permalink
fix(index): Add indexes for the upkeep queries that run (#194)
Browse files Browse the repository at this point in the history
The queries that the upkeep thread uses have different indexes from the get pending activation
query. Add more indexes to account for those queries as well.
  • Loading branch information
evanh authored Feb 19, 2025
1 parent 10b88ab commit f7febfc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions migrations/0001_create_inflight_taskactivations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ CREATE TABLE IF NOT EXISTS inflight_taskactivations (

CREATE INDEX idx_pending_activation
ON inflight_taskactivations (status, added_at, namespace, id);

CREATE INDEX idx_processing_deadline
ON inflight_taskactivations (status, processing_deadline);

CREATE INDEX idx_processing_attempts
ON inflight_taskactivations (status, processing_attempts);

CREATE INDEX idx_expires_at
ON inflight_taskactivations (status, expires_at);

0 comments on commit f7febfc

Please sign in to comment.