Browse Source

The tag query should be much faster now

pull/4500/head
Michael 3 years ago
parent
commit
fe68e99c7c
4 changed files with 5 additions and 3 deletions
  1. +1
    -1
      boot.php
  2. +2
    -1
      database.sql
  3. +1
    -1
      mod/network.php
  4. +1
    -0
      src/Database/DBStructure.php

+ 1
- 1
boot.php View File

@ -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);
/**


+ 2
- 1
database.sql View 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`),


+ 1
- 1
mod/network.php View 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`


+ 1
- 0
src/Database/DBStructure.php View 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"],


Loading…
Cancel
Save