Profiler/Completions

* add keyed col `exalted` to reputation completions table to speed up lookups
This commit is contained in:
Sarjuuk
2025-11-09 15:59:06 +01:00
parent 0d42d2a2c4
commit a135dfce90
4 changed files with 8 additions and 2 deletions

View File

@@ -1749,8 +1749,10 @@ CREATE TABLE `aowow_profiler_completion_reputation` (
`id` int(10) unsigned NOT NULL,
`factionId` smallint(5) unsigned NOT NULL,
`standing` mediumint(9) DEFAULT NULL,
`exalted` tinyint(1) GENERATED ALWAYS AS (`standing` >= 42000) STORED,
KEY `id` (`id`),
KEY `typeId` (`factionId`),
KEY `idx_exalted` (`exalted`),
CONSTRAINT `FK_pr_completion_reputation` 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 */;

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 (1762543653,0,NULL,NULL);
INSERT INTO `aowow_dbversion` VALUES (1762700148,0,NULL,NULL);
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
UNLOCK TABLES;

View File

@@ -0,0 +1,4 @@
ALTER TABLE aowow_profiler_completion_reputation
ADD COLUMN `exalted` tinyint(1) GENERATED ALWAYS AS (`standing` >= 42000) STORED AFTER `standing`,
ADD KEY idx_exalted (`exalted`)
;