refactor: counting users on homepage uses indexes

... and some intelligent queries for a change :P
This commit is contained in:
Martin Ambrus
2017-10-22 21:44:33 +02:00
parent 1749ff0c1d
commit 71ad4307e1
4 changed files with 14 additions and 6 deletions
+4
View File
@@ -1,3 +1,7 @@
-- 22.10.2017 -> SQL optimizations
ALTER TABLE `s1_users` ADD INDEX(`tribe`);
ALTER TABLE `s1_users` ADD INDEX `timestamp-tribe` (`timestamp`, `tribe`);
-- 22.10.2017 -> forum topics table and indexe changes
ALTER TABLE `s1_forum_post` CHANGE `topic` `topic` INT NULL DEFAULT NULL;
ALTER TABLE `s1_forum_post` CHANGE `owner` `owner` INT NULL DEFAULT NULL;