Improve query performance using explicit INDEXED BY (#3550)

This commit is contained in:
Tim Ruffing 2020-01-07 01:54:58 +01:00 committed by Scott Nonnenberg
parent de88a867a2
commit 016a0caf17

View file

@ -2233,6 +2233,7 @@ async function getExpiredMessages() {
async function getOutgoingWithoutExpiresAt() {
const rows = await db.all(`
SELECT json FROM messages
INDEXED BY messages_without_timer
WHERE
expireTimer > 0 AND
expires_at IS NULL AND