From 6aa5f492ed8ea91f49305c9a0dc44a4559f4c1f1 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 18 Sep 2024 22:47:07 +0000 Subject: [PATCH] Add an index over `node_announcements(seen, public_key)` Now that we query `node_announcements` and filter by `seen` and `public_key` we should have an index over them, which we add here. --- src/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.rs b/src/config.rs index 6220fc1..54c7b01 100644 --- a/src/config.rs +++ b/src/config.rs @@ -163,6 +163,7 @@ pub(crate) fn db_index_creation_query() -> &'static str { CREATE UNIQUE INDEX IF NOT EXISTS channel_updates_key ON channel_updates (short_channel_id, direction, timestamp); CREATE INDEX IF NOT EXISTS channel_updates_seen ON channel_updates(seen); CREATE INDEX IF NOT EXISTS channel_updates_scid_asc_timestamp_desc ON channel_updates(short_channel_id ASC, timestamp DESC); + CREATE INDEX IF NOT EXISTS node_announcements_seen_pubkey ON node_announcements(seen, public_key); " } -- 2.39.5