ssb: Stared at the news feed queries for performance and correctness a bit.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 26m27s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 26m27s
This commit is contained in:
parent
a1c4382fde
commit
21788fc7b0
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🦀",
|
||||
"previous": "&qe6da4WrU2hQ3nDaZk87SAccuUpGNP5rPCh5P5bRmxk=.sha256"
|
||||
"previous": "&ylIHNCaX9UzGb13pGbe7vqDlypSEuoxIxWzYLELHXXg=.sha256"
|
||||
}
|
||||
|
@ -86,8 +86,8 @@ class TfTabNewsFeedElement extends LitElement {
|
||||
JOIN messages_refs ON mine.id = messages_refs.ref
|
||||
JOIN messages ON messages_refs.message = messages.id
|
||||
WHERE
|
||||
mine.timestamp >= ?2 AND
|
||||
mine.timestamp < ?3
|
||||
messages.timestamp >= ?2 AND
|
||||
messages.timestamp < ?3
|
||||
UNION
|
||||
SELECT * FROM mine
|
||||
WHERE
|
||||
@ -101,7 +101,7 @@ class TfTabNewsFeedElement extends LitElement {
|
||||
`
|
||||
SELECT id, previous, author, sequence, timestamp, hash, json(content) AS content, signature
|
||||
FROM messages
|
||||
WHERE id = ?1
|
||||
WHERE messages.id = ?1
|
||||
UNION
|
||||
SELECT id, previous, author, sequence, timestamp, hash, json(content) AS content, signature
|
||||
FROM messages JOIN messages_refs
|
||||
|
Loading…
x
Reference in New Issue
Block a user