mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 18:06:35 +03:00
fix speed issues with ORDER BY clause
This commit is contained in:
@@ -2307,11 +2307,11 @@ pub async fn get_chat_msgs(
|
||||
context
|
||||
.sql
|
||||
.query_map(
|
||||
"SELECT m.id AS id, m.timestamp AS timestamp
|
||||
"SELECT (m.id+1) AS id, (m.timestamp+1) AS timestamp
|
||||
FROM msgs m
|
||||
WHERE m.chat_id=?
|
||||
AND m.hidden=0
|
||||
ORDER BY m.timestamp, m.id;",
|
||||
ORDER BY timestamp, id;",
|
||||
paramsv![chat_id],
|
||||
process_row,
|
||||
process_rows,
|
||||
|
||||
Reference in New Issue
Block a user