Skip to content

Commit 5b52c75

Browse files
authored
chore(coprocessor): add pending-tasks idx to optimize pbs_computation backlog (#1477)
chore(coprocessor): add pending-tasks idx to optimize pbs_computations backlog
1 parent b818dba commit 5b52c75

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- Pending tasks index for pbs_computations table
2+
-- This index improves the performance of queries that fetch pending tasks
3+
-- based on their creation time.
4+
CREATE INDEX idx_pending_tasks
5+
ON pbs_computations USING btree (created_at)
6+
WHERE is_completed = false;

0 commit comments

Comments
 (0)