Compare commits

...

1 Commits

Author SHA1 Message Date
holger krekel
dac320a810 fix speed issues with ORDER BY clause 2022-03-31 10:40:41 +02:00

View File

@@ -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,