Speed up orphaned attachment check

Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-08-26 09:32:45 -05:00 committed by GitHub
parent e0b9c8360f
commit 16d365e1d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6653,7 +6653,7 @@ function pageMessages(
(rowid INTEGER PRIMARY KEY ASC);
INSERT INTO tmp_${runId}_updated_messages (rowid)
SELECT rowid FROM messages ORDER BY rowid ASC;
SELECT rowid FROM messages;
CREATE TEMP TRIGGER tmp_${runId}_message_updates
UPDATE OF json ON messages
@ -6679,7 +6679,6 @@ function pageMessages(
`
DELETE FROM tmp_${runId}_updated_messages
RETURNING rowid
ORDER BY rowid ASC
LIMIT $chunkSize;
`
)