From cea4e6ba61c64ad30f47f192dbbcc11a9017a9d2 Mon Sep 17 00:00:00 2001
From: Christian Grothoff <christian@grothoff.org>
Date: Fri, 6 Jan 2023 13:21:18 +0100
Subject: add index on end row

---
 src/exchangedb/0002-work_shards.sql | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/exchangedb/0002-work_shards.sql')

diff --git a/src/exchangedb/0002-work_shards.sql b/src/exchangedb/0002-work_shards.sql
index fbe7e708..5ab08d39 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);
-- 
cgit v1.2.3

