trick sql to use a better suited index

This commit is contained in:
Mario
2025-06-13 08:05:05 +00:00
parent ad7871270c
commit 2046abf26f

View File

@@ -5604,7 +5604,7 @@ function items_by_thr_parent(string $mid, int $parent, int|null $offset = null):
$order_sql = "ORDER BY item.created";
if (isset($offset)) {
$order_sql = "ORDER BY item.created DESC LIMIT 3 OFFSET $offset";
$order_sql = "ORDER BY item.created DESC, item.received DESC LIMIT 3 OFFSET $offset";
}
$owner_uid = intval($parent_item[0]['uid']);