From: Michael Date: Sun, 5 Jan 2020 12:48:18 +0000 (+0000) Subject: Added index for performance considerations X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bad50d31c09fc04e978f1de78756d22b60711ee9;p=friendica.git Added index for performance considerations --- diff --git a/database.sql b/database.sql index 02d1ac895c..6252f80579 100644 --- a/database.sql +++ b/database.sql @@ -1287,7 +1287,8 @@ CREATE TABLE IF NOT EXISTS `user-item` ( `pinned` boolean COMMENT 'The item is pinned on the profile page', `notification-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', PRIMARY KEY(`uid`,`iid`), - INDEX `uid_pinned` (`uid`,`pinned`) + INDEX `uid_pinned` (`uid`,`pinned`), + INDEX `iid_uid` (`iid`,`uid`) ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='User specific item data'; -- diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index a7d851943d..20bd937690 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -1393,7 +1393,8 @@ return [ ], "indexes" => [ "PRIMARY" => ["uid", "iid"], - "uid_pinned" => ["uid", "pinned"] + "uid_pinned" => ["uid", "pinned"], + "iid_uid" => ["iid", "uid"] ] ], "worker-ipc" => [