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
committed by Diogo Peralta Cordeiro
parent ae4f3176b1
commit a0f72fe5c6
41 changed files with 633 additions and 656 deletions

View File

@@ -411,6 +411,7 @@ class FavoriteModule extends ActivityVerbHandlerModule
if (!empty($uas->after)) {
$fave->whereAdd("modified > '" . common_sql_date($uas->after) . "'");
}
$fave->orderBy('modified DESC, notice_id DESC');
if ($fave->find()) {
while ($fave->fetch()) {