From 1fde736d968c250059d93c8573ed4b1007b15c11 Mon Sep 17 00:00:00 2001 From: Tomasz Wolniewicz Date: Thu, 14 Sep 2023 21:48:03 +0200 Subject: [PATCH] these indexes spead up admin page loading --- schema/2_1-2_1_1.sql | 2 ++ schema/schema.sql | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/schema/2_1-2_1_1.sql b/schema/2_1-2_1_1.sql index 9e38cde01..43568c0cb 100644 --- a/schema/2_1-2_1_1.sql +++ b/schema/2_1-2_1_1.sql @@ -29,3 +29,5 @@ INSERT INTO profile_option_dict (name, description,type,flag) VALUES ('device-specific:geteduroam','show the dedicated geteduroam download page for this device','boolean',NULL); +ALTER TABLE downloads ADD KEY profile_id (profile_id); +ALTER TABLE downloads ADD KEY device_id (device_id); \ No newline at end of file diff --git a/schema/schema.sql b/schema/schema.sql index 015dda4fa..74d8333a2 100644 --- a/schema/schema.sql +++ b/schema/schema.sql @@ -206,7 +206,9 @@ CREATE TABLE `downloads` ( `mime` varchar(50) DEFAULT NULL, `eap_type` int(4), `openroaming` int(1), - UNIQUE KEY `profile_device_lang` (`device_id`,`profile_id`,`lang`, `openroaming`) + UNIQUE KEY `profile_device_lang` (`device_id`,`profile_id`,`lang`, `openroaming`), + KEY `device_id` (`device_id`), + KEY `profile_id` (`profile_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE `user_options` (