From 9308b7f2df4c6dd162eeb5dd334e057c96ab37d6 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 25 Feb 2018 21:58:21 +0000 Subject: [PATCH] inner join is better --- mod/network.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/network.php b/mod/network.php index 3ddb7dd2fd..924aa16b63 100644 --- a/mod/network.php +++ b/mod/network.php @@ -818,13 +818,14 @@ function networkThreadedView(App $a, $update = 0) } $items = dba::p("SELECT `item`.`uri`, `item`.`id` AS `item_id`, `item`.$ordering AS `order_date` FROM `item` - STRAIGHT_JOIN (SELECT `oid` FROM `term` WHERE `term` IN + INNER JOIN (SELECT `oid` FROM `term` WHERE `term` IN (SELECT SUBSTR(`term`, 2) FROM `search` WHERE `uid` = ? AND `term` LIKE '#%') AND `otype` = ? AND `type` = ? AND `uid` = 0) AS `term` ON `item`.`id` = `term`.`oid` STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`author-id` WHERE `item`.`uid` = 0 AND `item`.$ordering < ? AND `item`.$ordering > ? AND NOT `contact`.`hidden` AND NOT `contact`.`blocked`" . $sql_tag_nets, local_user(), TERM_OBJ_POST, TERM_HASHTAG, $top_limit, $bottom_limit); + $data = dba::inArray($items); if (count($data) > 0) { -- 2.39.5