]> Sergey Matveev's repositories - public-inbox.git/commit
lei: avoid SQLite COUNT() for dedupe
authorEric Wong <e@80x24.org>
Fri, 23 Jul 2021 10:56:11 +0000 (10:56 +0000)
committerEric Wong <e@80x24.org>
Sun, 25 Jul 2021 00:11:36 +0000 (00:11 +0000)
commit1218bee34cf04498ac36add5c7e847698be541c2
tree142afb972faffd2f01c1369cd1858cf36eb5b8ea
parentd15bd6a20a836473479d8431682ba305e2dcdfbe
lei: avoid SQLite COUNT() for dedupe

SQLite COUNT() is a slow operation that does a full table scan
with no conditions.  There's no need for it, since lei dedupe
only needs to know if it's empty or not to decide between
new/ and cur/ for Maildir outputs.
lib/PublicInbox/LeiDedupe.pm
lib/PublicInbox/LeiSavedSearch.pm
lib/PublicInbox/LeiToMail.pm
lib/PublicInbox/LeiXSearch.pm
lib/PublicInbox/SharedKV.pm