From 3e7f2e21df6c3efc885b77ed33c517e1e8fd0c4d Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Sun, 15 Jan 2023 10:23:46 -0600 Subject: [PATCH] perf: force authors index to be used if possible --- src/db.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/db.rs b/src/db.rs index 5b7acb8..5cdfd92 100644 --- a/src/db.rs +++ b/src/db.rs @@ -523,6 +523,10 @@ fn override_index(f: &ReqFilter) -> Option { return Some("kind_created_at_index".into()); } } + // if there is an author, it is much better to force the authors index. + if let Some(ks) = &f.authors { + return Some("author_index".into()); + } None }