From 1bb097fea7c49ae791e22267d09371f605413246 Mon Sep 17 00:00:00 2001 From: celestora Date: Thu, 4 Nov 2021 20:32:20 +0200 Subject: [PATCH] Add indices to MySQL ver. of EventDB --- install/init-event-db.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/init-event-db.sql b/install/init-event-db.sql index 1cde44cb..2ab6f0e3 100644 --- a/install/init-event-db.sql +++ b/install/init-event-db.sql @@ -29,6 +29,9 @@ CREATE TABLE `postViews` ( `timestamp` bigint(20) UNSIGNED NOT NULL, `verified` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 ) ENGINE=Aria DEFAULT CHARSET=utf8; + +ALTER TABLE `postViews` ADD INDEX(`owner`, `group`, `subscribed`); +ALTER TABLE `notifications` ADD INDEX(`recipientType`, `recipientId`, `timestamp`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;