Speed up orphaned attachment check
This commit is contained in:
parent
0dc2ab394f
commit
19e0eb4444
1 changed files with 1 additions and 2 deletions
|
@ -6653,7 +6653,7 @@ function pageMessages(
|
||||||
(rowid INTEGER PRIMARY KEY ASC);
|
(rowid INTEGER PRIMARY KEY ASC);
|
||||||
|
|
||||||
INSERT INTO tmp_${runId}_updated_messages (rowid)
|
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
|
CREATE TEMP TRIGGER tmp_${runId}_message_updates
|
||||||
UPDATE OF json ON messages
|
UPDATE OF json ON messages
|
||||||
|
@ -6679,7 +6679,6 @@ function pageMessages(
|
||||||
`
|
`
|
||||||
DELETE FROM tmp_${runId}_updated_messages
|
DELETE FROM tmp_${runId}_updated_messages
|
||||||
RETURNING rowid
|
RETURNING rowid
|
||||||
ORDER BY rowid ASC
|
|
||||||
LIMIT $chunkSize;
|
LIMIT $chunkSize;
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue