From: Matt Corallo Date: Tue, 13 Sep 2022 00:07:49 +0000 (+0000) Subject: Add some further indexes on channel_updates to match queries X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=63c51a6ed448fdc1c4d3656ebc8cce1d1e2e1d13;p=rapid-gossip-sync-server Add some further indexes on channel_updates to match queries --- diff --git a/src/config.rs b/src/config.rs index cd7a09d..5369e8d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -85,6 +85,8 @@ pub(crate) fn db_index_creation_query() -> &'static str { CREATE INDEX IF NOT EXISTS channel_updates_scid ON channel_updates(short_channel_id); CREATE INDEX IF NOT EXISTS channel_updates_direction ON channel_updates (short_channel_id, direction); CREATE INDEX IF NOT EXISTS channel_updates_seen ON channel_updates(seen); + CREATE INDEX IF NOT EXISTS channel_updates_scid_seen ON channel_updates(short_channel_id, seen); + CREATE INDEX IF NOT EXISTS channel_updates_scid_dir_seen ON channel_updates(short_channel_id ASC, direction ASC, seen DESC); " }