mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
refactor: DB optimizations
This commit is contained in:
@@ -1032,7 +1032,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%medal` (
|
||||
`points` varchar(15) NULL,
|
||||
`img` varchar(10) NULL,
|
||||
`del` tinyint(1) NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `week` (`week`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
||||
|
||||
--
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- 23.10.2017 -> SQL optimizations
|
||||
ALTER TABLE `s1_medal` ADD INDEX(`week`);
|
||||
|
||||
|
||||
-- 22.10.2017 -> SQL optimizations
|
||||
ALTER TABLE `s1_users` ADD INDEX(`tribe`);
|
||||
ALTER TABLE `s1_users` ADD INDEX `timestamp-tribe` (`timestamp`, `tribe`);
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
"SELECT * FROM s1_vdata WHERE wood > maxstore OR clay > maxstore OR iron > maxstore OR crop > maxcrop"
|
||||
"SELECT * FROM s1_odata WHERE maxstore < 800 OR maxcrop < 800"
|
||||
"SELECT * FROM s1_vdata WHERE wood < 0 OR clay < 0 OR iron < 0 OR crop < 0"
|
||||
"SELECT * FROM `s1_fdata`"
|
||||
- try to find and fix this (it's probably automation but has came up with a new registration, first login):
|
||||
"UPDATE s1_units set hero = hero - WHERE vref = 38801"
|
||||
Reference in New Issue
Block a user