From dadb26935c4d255c5a662f1e758bcf53864f7f95 Mon Sep 17 00:00:00 2001
From: Bryan Newbold <bnewbold@archive.org>
Date: Mon, 4 Apr 2022 15:52:02 -0700
Subject: sql: add source/created index on ingest_request table

---
 sql/migrations/2019-12-19-060141_init/up.sql | 1 +
 1 file changed, 1 insertion(+)

(limited to 'sql/migrations/2019-12-19-060141_init/up.sql')

diff --git a/sql/migrations/2019-12-19-060141_init/up.sql b/sql/migrations/2019-12-19-060141_init/up.sql
index 23a935e..33dba66 100644
--- a/sql/migrations/2019-12-19-060141_init/up.sql
+++ b/sql/migrations/2019-12-19-060141_init/up.sql
@@ -149,6 +149,7 @@ CREATE TABLE IF NOT EXISTS ingest_request (
     PRIMARY KEY (link_source, link_source_id, ingest_type, base_url)
 );
 CREATE INDEX ingest_request_base_url_idx ON ingest_request(base_url, ingest_type);
+CREATE INDEX ingest_request_source_created_idx ON ingest_request(ingest_request_source, created);
 
 CREATE TABLE IF NOT EXISTS ingest_file_result (
     ingest_type             TEXT NOT NULL CHECK (octet_length(ingest_type) >= 1),
-- 
cgit v1.2.3

