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

@@ -129,12 +129,12 @@ class apActorLikedAction extends ManagedAction
$limit = 40,
$since_id = null,
$max_id = null
) {
) {
$fav = new Fave();
$fav->user_id = $user_id;
$fav->orderBy('modified DESC');
$fav->orderBy('modified DESC, notice_id DESC');
if ($since_id != null) {
$fav->whereAdd("notice_id > {$since_id}");