Added index for performance considerations

This commit is contained in:
Michael 2020-01-05 12:48:18 +00:00
parent dcf5471e19
commit bad50d31c0
2 changed files with 4 additions and 2 deletions

View 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';
--

View File

@ -1393,7 +1393,8 @@ return [
],
"indexes" => [
"PRIMARY" => ["uid", "iid"],
"uid_pinned" => ["uid", "pinned"]
"uid_pinned" => ["uid", "pinned"],
"iid_uid" => ["iid", "uid"]
]
],
"worker-ipc" => [