Avoid ordering just by a timestamp

Try to also employ an id when possible.
Involves reworking some of the indices.
This commit is contained in:
Alexei Sorokin
2020-09-15 16:59:27 +03:00
parent 8079a476b6
commit 52d67b0f44
41 changed files with 633 additions and 656 deletions

View File

@@ -208,7 +208,7 @@ class DirectMessagePlugin extends Plugin
$message->selectAdd(); // clears it
$message->selectAdd('id');
$message->orderBy('created ASC');
$message->orderBy('created, id');
if ($message->find()) {
while ($message->fetch()) {