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

This commit is contained in:
Mario Vavti
2018-02-04 20:42:40 +01:00
parent 512f3a7643
commit 3cc756f302
8 changed files with 59 additions and 36 deletions

View File

@@ -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())
);