From cb74efc6054577367fb918565e6ac9ad33f6071e Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Fri, 7 May 2021 17:27:15 -0400 Subject: Limit query interface results using search.rowid DESC This vastly increases the speed of the query for any search with a decent number of matches. It can be slightly less accurate since it depends on the insert order of events, but that usually won't be a problem for a query limited to a single network. The litterbox query interface isn't meant to exhaustively list results either. --- litterbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litterbox.c b/litterbox.c index 19bdca6..f219d37 100644 --- a/litterbox.c +++ b/litterbox.c @@ -288,7 +288,7 @@ static void querySearch(struct Message *msg) { WHERE contexts.network = :network AND coalesce(contexts.query = :query, true) AND search MATCH :search - ORDER BY time DESC, event DESC + ORDER BY search.rowid DESC LIMIT :limit ) SELECT * FROM results -- cgit 1.4.1 rc/refs/?id=96f6ec577591dab5130ba0a6a69bcffa84d1eabd'>refs log tree commit diff
path: root/curtis/.config/nvim/syntax (unfollow)
Commit message (Expand)Author
2017-07-28Add toggle to hnelJune McEnroe
2017-07-28Install slJune McEnroe
2017-07-25Add up, supJune McEnroe
2017-07-24Autopickup ringsJune McEnroe
2017-07-24Name dogJune McEnroe
2017-07-23Add nethackrcJune McEnroe
2017-07-23Remove useless setuid in briJune McEnroe
2017-07-23Clean up hnel a tiny bitJune McEnroe
2017-07-21Set window size in hnelJune McEnroe
2017-07-21Add hnelJune McEnroe
2017-07-19chmod 600 in dtchJune McEnroe