* add keys to spells table to speed up related spells queries
This commit is contained in:
Sarjuuk
2025-11-07 20:30:59 +01:00
parent f44de66de7
commit 5d02a20719
3 changed files with 37 additions and 2 deletions

View File

@@ -2737,7 +2737,24 @@ CREATE TABLE `aowow_spell` (
KEY `spell` (`id`) USING BTREE,
KEY `effects` (`effect1Id`,`effect2Id`,`effect3Id`),
KEY `items` (`effect1CreateItemId`,`effect2CreateItemId`,`effect3CreateItemId`),
KEY `iconId` (`iconId`)
KEY `iconId` (`iconId`),
KEY `reagent1` (`reagent1`),
KEY `reagent2` (`reagent2`),
KEY `reagent3` (`reagent3`),
KEY `reagent4` (`reagent4`),
KEY `reagent5` (`reagent5`),
KEY `reagent6` (`reagent6`),
KEY `reagent7` (`reagent7`),
KEY `reagent8` (`reagent8`),
KEY `effect1CreateItemId` (`effect1CreateItemId`),
KEY `effect2CreateItemId` (`effect2CreateItemId`),
KEY `effect3CreateItemId` (`effect3CreateItemId`),
KEY `effect1Id` (`effect1Id`),
KEY `effect2Id` (`effect2Id`),
KEY `effect3Id` (`effect3Id`),
KEY `effect1AuraId` (`effect1AuraId`),
KEY `effect2AuraId` (`effect2AuraId`),
KEY `effect3AuraId` (`effect3AuraId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

View File

@@ -71,7 +71,7 @@ UNLOCK TABLES;
LOCK TABLES `aowow_dbversion` WRITE;
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
INSERT INTO `aowow_dbversion` VALUES (1762352734,0,NULL,NULL);
INSERT INTO `aowow_dbversion` VALUES (1762543653,0,NULL,NULL);
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
UNLOCK TABLES;

View File

@@ -0,0 +1,18 @@
ALTER TABLE `aowow_spell`
ADD KEY reagent1 (`reagent1`),
ADD KEY reagent2 (`reagent2`),
ADD KEY reagent3 (`reagent3`),
ADD KEY reagent4 (`reagent4`),
ADD KEY reagent5 (`reagent5`),
ADD KEY reagent6 (`reagent6`),
ADD KEY reagent7 (`reagent7`),
ADD KEY reagent8 (`reagent8`),
ADD KEY effect1CreateItemId (`effect1CreateItemId`),
ADD KEY effect2CreateItemId (`effect2CreateItemId`),
ADD KEY effect3CreateItemId (`effect3CreateItemId`),
ADD KEY effect1Id (`effect1Id`),
ADD KEY effect2Id (`effect2Id`),
ADD KEY effect3Id (`effect3Id`),
ADD KEY effect1AuraId (`effect1AuraId`),
ADD KEY effect2AuraId (`effect2AuraId`),
ADD KEY effect3AuraId (`effect3AuraId`);