From 3cc756f3029e5f3b02008dac94a90e168d398c9a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 4 Feb 2018 20:42:40 +0100 Subject: 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 --- install/update.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install/update.php b/install/update.php index f7b9b03ed..1bb39fc65 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ Date: Sun, 4 Feb 2018 21:13:24 +0100 Subject: remove indices from mysql schema file --- install/schema_mysql.sql | 7 ------- 1 file changed, 7 deletions(-) (limited to 'install') diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 673e4cd75..a3c80aafd 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -690,14 +690,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `item_verified` (`item_verified`), KEY `item_retained` (`item_retained`), KEY `item_rss` (`item_rss`), - KEY `item_deleted` (`item_deleted`), - KEY `item_type` (`item_type`), - KEY `item_hidden` (`item_hidden`), KEY `item_consensus` (`item_consensus`), - KEY `item_unpublished` (`item_unpublished`), - KEY `item_delayed` (`item_delayed`), - KEY `item_pending_remove` (`item_pending_remove`), - KEY `item_blocked` (`item_blocked`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `item_id` ( -- cgit v1.2.3 From f9aecf5d4c8304acb51d05be5bf2fd4bb70f790f Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 4 Feb 2018 21:17:41 +0100 Subject: superfluous , --- install/schema_mysql.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install') diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index a3c80aafd..c011cc157 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -690,7 +690,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `item_verified` (`item_verified`), KEY `item_retained` (`item_retained`), KEY `item_rss` (`item_rss`), - KEY `item_consensus` (`item_consensus`), + KEY `item_consensus` (`item_consensus`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `item_id` ( -- cgit v1.2.3 From 9d55a254dcd39e2a77a1c24625adba69d16acb7a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 4 Feb 2018 22:37:30 +0100 Subject: this will fix the cards query and keep the rest intact --- install/schema_mysql.sql | 4 ++-- install/update.php | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'install') diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index c011cc157..ea13e0de6 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -644,7 +644,6 @@ CREATE TABLE IF NOT EXISTS `item` ( `item_pending_remove` tinyint(1) NOT NULL DEFAULT 0 , `item_blocked` tinyint(1) NOT NULL DEFAULT 0 , PRIMARY KEY (`id`), - KEY `uid` (`uid`), KEY `parent` (`parent`), KEY `created` (`created`), KEY `edited` (`edited`), @@ -690,7 +689,8 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `item_verified` (`item_verified`), KEY `item_retained` (`item_retained`), KEY `item_rss` (`item_rss`), - KEY `item_consensus` (`item_consensus`) + KEY `item_consensus` (`item_consensus`), + KEY `item_type` (`item_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `item_id` ( diff --git a/install/update.php b/install/update.php index 1bb39fc65..ceaccdfa3 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@