diff options
author | Max Kostikov <max@kostikov.co> | 2019-04-28 20:59:53 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-04-28 20:59:53 +0200 |
commit | 0cecfceb14083141da389b7cc1e413ba5d5ca6d7 (patch) | |
tree | 018e6b20a459f2eec771e89db3b758656b3f25ee /include/items.php | |
parent | d3ce91bd8928b55d9be501d3cf140b3f5e6a7e91 (diff) | |
parent | 405e07f0a232445e179e2df821e77007f3b6d33d (diff) | |
download | volse-hubzilla-0cecfceb14083141da389b7cc1e413ba5d5ca6d7.tar.gz volse-hubzilla-0cecfceb14083141da389b7cc1e413ba5d5ca6d7.tar.bz2 volse-hubzilla-0cecfceb14083141da389b7cc1e413ba5d5ca6d7.zip |
Merge branch 'sql_fixes' into 'dev'
possible sql performance improvement
See merge request hubzilla/core!1611
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php index c08deb3a0..95b696034 100755 --- a/include/items.php +++ b/include/items.php @@ -4278,7 +4278,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C if($arr['mid']) $sql_options .= " and parent_mid = '" . dbesc($arr['mid']) . "' "; - $sql_extra = " AND item.parent IN ( SELECT parent FROM item WHERE item_thread_top = 1 $sql_options $item_normal ) "; + $sql_extra = " AND item.parent IN ( SELECT parent FROM item WHERE $item_uids and item_thread_top = 1 $sql_options $item_normal ) "; if($arr['since_id']) $sql_extra .= " and item.id > " . $since_id . " "; |