From b356c3bcd3f0166b16716b7804578d9cec83c9c3 Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Sun, 31 Dec 2023 20:33:38 +0100 Subject: [PATCH] Updated after optimizing indexes --- web/init/mastostart_solo_struttura.sql | 33 +++++++++++++++----------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/web/init/mastostart_solo_struttura.sql b/web/init/mastostart_solo_struttura.sql index 1f89f26..6eee970 100644 --- a/web/init/mastostart_solo_struttura.sql +++ b/web/init/mastostart_solo_struttura.sql @@ -51,7 +51,7 @@ CREATE TABLE `Financing` ( `Type` varchar(256) NOT NULL, `AddedBy` int(10) unsigned NOT NULL DEFAULT 1, PRIMARY KEY (`ID`), - KEY `AddedBy` (`ID`) + KEY `AddedBy` (`AddedBy`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -115,7 +115,8 @@ CREATE TABLE `InstFinancing` ( `InstID` bigint(20) unsigned NOT NULL, `FinID` int(10) unsigned NOT NULL, `Pos` tinyint(3) unsigned NOT NULL, - KEY `InstID` (`InstID`,`FinID`) + KEY `InstID` (`InstID`) USING BTREE, + KEY `FinID` (`FinID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -130,7 +131,8 @@ CREATE TABLE `InstLangs` ( `InstID` bigint(20) unsigned NOT NULL, `LangID` int(10) unsigned NOT NULL, `Pos` tinyint(3) unsigned NOT NULL, - KEY `InstID` (`InstID`,`LangID`) + KEY `InstID` (`InstID`) USING BTREE, + KEY `LangID` (`LangID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -145,7 +147,8 @@ CREATE TABLE `InstOurLangs` ( `InstID` bigint(20) unsigned NOT NULL, `OurLangID` int(10) unsigned NOT NULL, `Pos` tinyint(3) unsigned NOT NULL, - KEY `InstID` (`InstID`,`OurLangID`) + KEY `InstID` (`InstID`) USING BTREE, + KEY `OurLangID` (`OurLangID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -160,7 +163,8 @@ CREATE TABLE `InstPolicies` ( `InstID` bigint(20) unsigned NOT NULL, `PolID` int(10) unsigned NOT NULL, `Pos` tinyint(3) unsigned NOT NULL, - KEY `InstID` (`InstID`,`PolID`) + KEY `InstID` (`InstID`) USING BTREE, + KEY `PolID` (`PolID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -189,7 +193,8 @@ CREATE TABLE `InstTags` ( `InstID` bigint(20) unsigned NOT NULL, `TagID` int(10) unsigned NOT NULL, `Pos` tinyint(3) unsigned NOT NULL, - KEY `InstID` (`InstID`,`TagID`) + KEY `InstID` (`InstID`) USING BTREE, + KEY `TagID` (`TagID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -263,8 +268,8 @@ CREATE TABLE `Instances` ( `InsertTS` int(10) unsigned DEFAULT NULL, `RPos` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`ID`), - KEY `LocalityID` (`ID`), - KEY `GuestID` (`ID`) + KEY `LocalityID` (`LocalityID`) USING BTREE, + KEY `GuestID` (`GuestID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -290,7 +295,7 @@ CREATE TABLE `Languages` ( `NameIT` varchar(64) DEFAULT NULL, `AddedBy` int(10) unsigned NOT NULL DEFAULT 1, PRIMARY KEY (`ID`), - KEY `AddedBy` (`ID`) + KEY `AddedBy` (`AddedBy`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -313,7 +318,7 @@ CREATE TABLE `Localities` ( `NameIT` varchar(128) DEFAULT NULL, `AddedBy` int(10) unsigned NOT NULL DEFAULT 1, PRIMARY KEY (`ID`), - KEY `AddedBy` (`ID`) + KEY `AddedBy` (`AddedBy`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -379,7 +384,7 @@ CREATE TABLE `Policies` ( `Name` varchar(64) NOT NULL, `AddedBy` int(10) unsigned NOT NULL DEFAULT 1, PRIMARY KEY (`ID`), - KEY `AddedBy` (`ID`) + KEY `AddedBy` (`AddedBy`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -501,7 +506,7 @@ CREATE TABLE `Tags` ( `Name` varchar(64) NOT NULL, `AddedBy` int(10) unsigned NOT NULL DEFAULT 1, PRIMARY KEY (`ID`), - KEY `AddedBy` (`ID`) + KEY `AddedBy` (`AddedBy`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -530,7 +535,7 @@ CREATE TABLE `Users` ( `last_status_at` int(10) unsigned DEFAULT NULL, `tags` varchar(4096) DEFAULT NULL, PRIMARY KEY (`ID`), - KEY `InstID` (`ID`) + KEY `InstID` (`InstID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -590,4 +595,4 @@ CREATE TABLE `ZStats` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2023-12-27 0:06:12 +-- Dump completed on 2023-12-31 20:33:04