about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-08-26 08:17:40 +0000
committerEric Wong <e@yhbt.net>2020-08-27 10:57:26 +0000
commitb61b55643c617403f8d141cfe9bff22ad47913f7 (patch)
treeb8e311bce7a3558a4354a107d51bb09929a41a7b /lib
parent22e7956e56f3a63479b894af0ee4812ff7ae025a (diff)
downloadpublic-inbox-b61b55643c617403f8d141cfe9bff22ad47913f7.tar.gz
As noted in commit 87dca6d8d5988c5eb54019cca342450b0b7dd6b7
("www: rework query responses to avoid COUNT in SQLite"),
COUNT on many rows is expensive on big SQLite DBs.

We've already stopped using that code path long ago in WWW
while -imapd and -nntpd never used it.  So we'll adjust our
remaining test cases to not need it, either.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Over.pm8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/PublicInbox/Over.pm b/lib/PublicInbox/Over.pm
index a2cf9f21..6b7d5216 100644
--- a/lib/PublicInbox/Over.pm
+++ b/lib/PublicInbox/Over.pm
@@ -244,15 +244,9 @@ sub recent {
                         $s = '+num > 0 ORDER BY ts DESC';
                 }
         }
-        my $msgs = do_get($self, <<"", $opts, @v);
+        do_get($self, <<"", $opts, @v);
 SELECT ts,ds,ddd FROM over WHERE $s
 
-        return $msgs unless wantarray;
-
-        my $nr = $self->{dbh}->selectrow_array(<<'');
-SELECT COUNT(num) FROM over WHERE num > 0
-
-        ($nr, $msgs);
 }
 
 sub get_art {