Skip to content

Commit 2531f02

Browse files
committed
fix(coprocessor): db migration, improve indexing for sns worker fetching work
1 parent 3b11a36 commit 2531f02

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--- Improve indexing for SNS worker selection queries
2+
3+
CREATE INDEX IF NOT EXISTS idx_pbs_computations_pending_created_at
4+
ON pbs_computations (created_at, handle)
5+
WHERE is_completed = FALSE;
6+
7+
CREATE INDEX IF NOT EXISTS idx_ciphertexts_handle_not_null
8+
ON ciphertexts (handle)
9+
WHERE ciphertext IS NOT NULL;

0 commit comments

Comments
 (0)