perf(db): index operator listener match claims

Signed-off-by: Jarrod Sibbison <jsibbison@squareup.com>
This commit is contained in:
Jarrod Sibbison
2026-09-21 09:58:45 +10:00
parent 0be216dcdc
commit c7ad0bc589
2 changed files with 6 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ CREATE INDEX operator_listener_match_queue_due
CREATE INDEX operator_listener_match_queue_recovery
ON operator_listener_match_queue (lease_until)
WHERE state = 'matching';
CREATE INDEX operator_listener_match_queue_claim
ON operator_listener_match_queue (claim_id)
WHERE state = 'matching';
CREATE TABLE operator_listener_outbox (
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(),

View File

@@ -947,6 +947,9 @@ CREATE INDEX operator_listener_match_queue_due
CREATE INDEX operator_listener_match_queue_recovery
ON operator_listener_match_queue (lease_until)
WHERE state = 'matching';
CREATE INDEX operator_listener_match_queue_claim
ON operator_listener_match_queue (claim_id)
WHERE state = 'matching';
CREATE TABLE operator_listener_outbox (
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(),