diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-02-04 20:42:40 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-02-04 20:42:40 +0100 |
commit | 3cc756f3029e5f3b02008dac94a90e168d398c9a (patch) | |
tree | bc6b6cdc552ef119e0f7beb8b40e83ffe59798c7 /Zotlabs/Widget/Forums.php | |
parent | 512f3a764361dde44e36fb72c105265d6df298ad (diff) | |
download | volse-hubzilla-3cc756f3029e5f3b02008dac94a90e168d398c9a.tar.gz volse-hubzilla-3cc756f3029e5f3b02008dac94a90e168d398c9a.tar.bz2 volse-hubzilla-3cc756f3029e5f3b02008dac94a90e168d398c9a.zip |
remove some never used indices which prevented our item queries to find the right query execution plan in mysql and adjust some queries to optimze the result
Diffstat (limited to 'Zotlabs/Widget/Forums.php')
-rw-r--r-- | Zotlabs/Widget/Forums.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index 44d95012f..b572444e3 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -64,7 +64,8 @@ class Forums { // There also should be a way to update this via ajax. for($x = 0; $x < count($r1); $x ++) { - $r = q("select sum(item_unseen) as unseen from item where owner_xchan = '%s' and uid = %d and item_unseen = 1 $perms_sql ", + $r = q("select sum(item_unseen) as unseen from item + where owner_xchan = '%s' and uid = %d and item_unseen = 1 $perms_sql ", dbesc($r1[$x]['xchan_hash']), intval(local_channel()) ); |