aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Pubstream.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-02-04 20:42:40 +0100
committerMario Vavti <mario@mariovavti.com>2018-02-04 20:42:40 +0100
commit3cc756f3029e5f3b02008dac94a90e168d398c9a (patch)
treebc6b6cdc552ef119e0f7beb8b40e83ffe59798c7 /Zotlabs/Module/Pubstream.php
parent512f3a764361dde44e36fb72c105265d6df298ad (diff)
downloadvolse-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/Module/Pubstream.php')
-rw-r--r--Zotlabs/Module/Pubstream.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index 2c25e2ce0..16a5fdbba 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -196,10 +196,10 @@ class Pubstream extends \Zotlabs\Web\Controller {
}
else {
// Fetch a page full of parent items for this page
- $r = q("SELECT distinct item.id AS item_id, $ordering FROM item
+ $r = q("SELECT item.id AS item_id FROM item
left join abook on item.author_xchan = abook.abook_xchan
$net_query
- WHERE true $uids $item_normal
+ WHERE item_thread_top = 1 $uids $item_normal
AND item.parent = item.id
and (abook.abook_blocked = 0 or abook.abook_flags is null)
$sql_extra3 $sql_extra $sql_nets $net_query2