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 -1
View File
@@ -1548,7 +1548,10 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%users` (
KEY `invited` (`invited`),
KEY `lastupdate` (`lastupdate`),
KEY `alliance` (`alliance`),
KEY `username` (`username`(25)) USING BTREE
KEY `username` (`username`(25)) USING BTREE,
KEY `tribe` (`tribe`),
KEY `timestamp` (`timestamp`),
KEY `timestamp-tribe` (`timestamp`,`tribe`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
--