DB/Profiler

* add indizes to searchable cols to hopefully speed up page loads
This commit is contained in:
Sarjuuk 2026-01-14 17:05:51 +01:00
parent b4f40b4264
commit 59506dda11
3 changed files with 34 additions and 2 deletions

View file

@ -1702,7 +1702,9 @@ CREATE TABLE `aowow_profiler_arena_team` (
PRIMARY KEY (`id`),
UNIQUE KEY `realm_realmGUID` (`realm`,`realmGUID`),
KEY `name` (`name`),
KEY `idx_stub` (`stub`)
KEY `idx_stub` (`stub`),
KEY `idx_type` (`type`),
KEY `idx_rating` (`rating`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -1795,6 +1797,7 @@ CREATE TABLE `aowow_profiler_completion_skills` (
`max` smallint(5) unsigned DEFAULT NULL,
KEY `id` (`id`),
KEY `typeId` (`skillId`),
KEY `idx_value` (`value`),
CONSTRAINT `FK_pr_completion_skills` FOREIGN KEY (`id`) REFERENCES `aowow_profiler_profiles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -2014,6 +2017,15 @@ CREATE TABLE `aowow_profiler_profiles` (
KEY `idx_custom` (`custom`),
KEY `idx_stub` (`stub`),
KEY `idx_deleted` (`deleted`),
KEY `idx_race` (`race`),
KEY `idx_class` (`class`),
KEY `idx_level` (`level`),
KEY `idx_guildrank` (`guildrank`),
KEY `idx_gearscore` (`gearscore`),
KEY `idx_achievementpoints` (`achievementpoints`),
KEY `idx_talenttree1` (`talenttree1`),
KEY `idx_talenttree2` (`talenttree2`),
KEY `idx_talenttree3` (`talenttree3`),
CONSTRAINT `FK_aowow_profiler_profiles_aowow_profiler_guild` FOREIGN KEY (`guild`) REFERENCES `aowow_profiler_guild` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) 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 (1768324766,0,NULL,NULL);
INSERT INTO `aowow_dbversion` VALUES (1768385061,0,NULL,NULL);
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
UNLOCK TABLES;

View file

@ -0,0 +1,20 @@
ALTER TABLE `aowow_profiler_profiles`
ADD INDEX idx_race (`race`),
ADD INDEX idx_class (`class`),
ADD INDEX idx_level (`level`),
ADD INDEX idx_guildrank (`guildrank`),
ADD INDEX idx_gearscore (`gearscore`),
ADD INDEX idx_achievementpoints (`achievementpoints`),
ADD INDEX idx_talenttree1 (`talenttree1`),
ADD INDEX idx_talenttree2 (`talenttree2`),
ADD INDEX idx_talenttree3 (`talenttree3`)
;
ALTER TABLE aowow_profiler_completion_skills
ADD INDEX idx_value (`value`)
;
ALTER TABLE aowow_profiler_arena_team
ADD INDEX idx_type (`type`),
ADD INDEX idx_rating (`rating`)
;