From 3979a94726b642af2a526064686b9022779345c6 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Mon, 30 Jan 2023 18:02:40 -0600 Subject: [PATCH] improvement: do not force query to use index when limit is specified --- src/repo/sqlite.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repo/sqlite.rs b/src/repo/sqlite.rs index bdd21ac..8abe959 100644 --- a/src/repo/sqlite.rs +++ b/src/repo/sqlite.rs @@ -645,7 +645,7 @@ fn override_index(f: &ReqFilter) -> Option { } // if there is an author, it is much better to force the authors index. if f.authors.is_some() { - if f.since.is_none() && f.until.is_none() { + if f.since.is_none() && f.until.is_none() && f.limit.is_none() { if f.kinds.is_none() { // with no use of kinds/created_at, just author return Some("author_index".into());