]> git.mxchange.org Git - friendica.git/commitdiff
Added index for performance considerations
authorMichael <heluecht@pirati.ca>
Sun, 5 Jan 2020 12:48:18 +0000 (12:48 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 5 Jan 2020 12:48:18 +0000 (12:48 +0000)
database.sql
static/dbstructure.config.php

index 02d1ac895c5d517d4e3362e1124a2bdbce2d6a21..6252f8057944ec49a396896f731776dd12a55754 100644 (file)
@@ -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';
 
 --
index a7d851943d00cb227e51499f180645528f57edb7..20bd93769031d44f795e77f97378e170311f500d 100755 (executable)
@@ -1393,7 +1393,8 @@ return [
                ],
                "indexes" => [
                        "PRIMARY" => ["uid", "iid"],
-                       "uid_pinned" => ["uid", "pinned"]
+                       "uid_pinned" => ["uid", "pinned"],
+                       "iid_uid" => ["iid", "uid"]
                ]
        ],
        "worker-ipc" => [