]> git.mxchange.org Git - friendica.git/commitdiff
The tag query should be much faster now
authorMichael <heluecht@pirati.ca>
Mon, 26 Feb 2018 06:59:32 +0000 (06:59 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 26 Feb 2018 06:59:32 +0000 (06:59 +0000)
boot.php
database.sql
mod/network.php
src/Database/DBStructure.php

index 2a8bf1806a4489b9a55a75fcf8a494949f45cebf..472814a6db546d9a07e41732bc43533982249a69 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -39,7 +39,7 @@ define('FRIENDICA_PLATFORM',     'Friendica');
 define('FRIENDICA_CODENAME',     'Asparagus');
 define('FRIENDICA_VERSION',      '3.6-dev');
 define('DFRN_PROTOCOL_VERSION',  '2.23');
-define('DB_UPDATE_VERSION',      1254);
+define('DB_UPDATE_VERSION',      1255);
 define('NEW_UPDATE_ROUTINE_VERSION', 1170);
 
 /**
index a1c3e31e41eae77a39935d18d3a323e22717de63..4275c38315ccf26cd82c81b1df9dbcd3c93614de 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 3.6-dev (Asparagus)
--- DB_UPDATE_VERSION 1254
+-- DB_UPDATE_VERSION 1255
 -- ------------------------------------------
 
 
@@ -512,6 +512,7 @@ CREATE TABLE IF NOT EXISTS `item` (
         INDEX `uid_id` (`uid`,`id`),
         INDEX `uid_contactid_id` (`uid`,`contact-id`,`id`),
         INDEX `uid_created` (`uid`,`created`),
+        INDEX `uid_commented` (`uid`,`commented`),
         INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
         INDEX `uid_network_received` (`uid`,`network`,`received`),
         INDEX `uid_network_commented` (`uid`,`network`,`commented`),
index 924aa16b63f76f77cb3cc3d7181d9fa084674135..5e8f5b760989df21102bd554c25035bef3bd94be 100644 (file)
@@ -818,7 +818,7 @@ function networkThreadedView(App $a, $update = 0)
                }
 
                $items = dba::p("SELECT `item`.`uri`, `item`.`id` AS `item_id`, `item`.$ordering AS `order_date` FROM `item`
-                       INNER JOIN (SELECT `oid` FROM `term` WHERE `term` IN
+                       STRAIGHT_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`
index 0b5eca1ae05dda654fa7e590d348456721c81168..f4a88871d7a0c8032b5f874232c51f3ba28e637f 100644 (file)
@@ -1191,6 +1191,7 @@ class DBStructure
                                                "uid_id" => ["uid","id"],
                                                "uid_contactid_id" => ["uid","contact-id","id"],
                                                "uid_created" => ["uid","created"],
+                                               "uid_commented" => ["uid","commented"],
                                                "uid_unseen_contactid" => ["uid","unseen","contact-id"],
                                                "uid_network_received" => ["uid","network","received"],
                                                "uid_network_commented" => ["uid","network","commented"],