mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-12-22 16:35:51 -05:00
perf: force event hash index if filter uses ids
This commit is contained in:
parent
9c77b06f79
commit
2d3a35fe30
|
@ -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<String> {
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user