Skip to content

Commit 571bbde

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

File tree

1 file changed

+11
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)