From cea4e6ba61c64ad30f47f192dbbcc11a9017a9d2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 6 Jan 2023 13:21:18 +0100 Subject: [PATCH] add index on end row --- src/exchangedb/0002-work_shards.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/exchangedb/0002-work_shards.sql b/src/exchangedb/0002-work_shards.sql index fbe7e7086..5ab08d39b 100644 --- a/src/exchangedb/0002-work_shards.sql +++ b/src/exchangedb/0002-work_shards.sql @@ -44,3 +44,7 @@ CREATE INDEX work_shards_by_job_name_completed_last_attempt_index ,completed ,last_attempt ASC ); + +CREATE INDEX work_shards_by_end_row_index + ON work_shards + (end_row DESC);