diff --git a/src/repo/sqlite.rs b/src/repo/sqlite.rs index 4d12b7b..7463de1 100644 --- a/src/repo/sqlite.rs +++ b/src/repo/sqlite.rs @@ -658,6 +658,9 @@ impl NostrRepo for SqliteRepo { /// Decide if there is an index that should be used explicitly fn override_index(f: &ReqFilter) -> Option { + if f.ids.is_some() { + return Some("event_hash_index".into()); + } // queries for multiple kinds default to kind_index, which is // significantly slower than kind_created_at_index. if let Some(ks) = &f.kinds {