Statistics: Posted by RoLa — 26 Feb 2014, 22:42
Dragonfire wrote:
By 8 miinsl row, the b-tree size of the index is not small ...
Statistics: Posted by Cuddles — 26 Feb 2014, 12:37
Statistics: Posted by Ze_PilOt — 26 Feb 2014, 11:57
(-1 = -1 OR gamemodid = -1) AND (-1 = 60702 OR playerId = 60702) AND rating >= 0
AND (-1 = -1 OR mapId = -1) AND
Statistics: Posted by Cuddles — 26 Feb 2014, 11:48
Statistics: Posted by RoLa — 25 Feb 2014, 18:10
Statistics: Posted by RoLa — 25 Feb 2014, 18:09
Statistics: Posted by Ze_PilOt — 25 Feb 2014, 18:05
RoLa wrote:If the query for the creation of the replay_vault takes longer than some seconds an incremental update of the table would be perhaps faster. You can save the time stamp of the last query and select and insert only newer data rows to the replay_vault
Dragonfire wrote:
@all:
If you would implement a client side cache for player stats and more "static" data ...
Which persistence method would you recommend?
SqlLite? CVS? own folder system?
We cannot install MongoDB on each client
Statistics: Posted by Dragonfire — 25 Feb 2014, 17:55
Statistics: Posted by Aurion — 25 Feb 2014, 16:13
Aurion wrote:A materialized view is just putting the whole view in a table, causing it to be MUCH faster for views with lots of joins. MySQL doesn't have built-in functionality for this so you have to write your own stuff to renew it. The question isn't wether the data changes frequently, but if you need to see everything in real-time. If the latter is not the case (I don't think every 3 minutes makes it worth your trouble) it can be viable.
CREATE TABLE `replay_vault_temp` SELECT `game_stats`.`id` AS `id`,`game_stats`.`gameName` AS `gameName`,`table_map`.`filename` AS `filename`,`game_stats`.`startTime` AS `startTime`,`game_stats`.`EndTime` AS `EndTime`,`game_featuredMods`.`gamemod` AS `gamemod`,`game_player_stats`.`playerId` AS `playerId`,`game_stats`.`mapId` AS `mapId`,(`game_player_stats`.`mean` - (3 * `game_player_stats`.`deviation`)) AS `rating`,`game_stats`.`gameMod` AS `gamemodid` from (((`game_stats` left join `game_featuredMods` on((`game_featuredMods`.`id` = `game_stats`.`gameMod`))) left join `table_map` on((`table_map`.`id` = `game_stats`.`mapId`))) join `game_player_stats` on((`game_player_stats`.`gameId` = `game_stats`.`id`))) where ((`game_stats`.`startTime` is not null) and (`game_stats`.`EndTime` is not null) and ((select count(0) from `game_replays` where ((`game_replays`.`UID` = `game_stats`.`id`) and (`game_replays`.`file` is not null))) <> 0));
DROP TABLE IF EXISTS `replay_vault`;
RENAME TABLE `replay_vault_temp` TO `replay_vault`
Statistics: Posted by Aurion — 25 Feb 2014, 15:24
CREATE TABLE `replay_vault_temp` SELECT `game_stats`.`id` AS `id`,`game_stats`.`gameName` AS `gameName`,`table_map`.`filename` AS `filename`,`game_stats`.`startTime` AS `startTime`,`game_stats`.`EndTime` AS `EndTime`,`game_featuredMods`.`gamemod` AS `gamemod`,`game_player_stats`.`playerId` AS `playerId`,`game_stats`.`mapId` AS `mapId`,(`game_player_stats`.`mean` - (3 * `game_player_stats`.`deviation`)) AS `rating`,`game_stats`.`gameMod` AS `gamemodid` from (((`game_stats` left join `game_featuredMods` on((`game_featuredMods`.`id` = `game_stats`.`gameMod`))) left join `table_map` on((`table_map`.`id` = `game_stats`.`mapId`))) join `game_player_stats` on((`game_player_stats`.`gameId` = `game_stats`.`id`))) where ((`game_stats`.`startTime` is not null) and (`game_stats`.`EndTime` is not null) and ((select count(0) from `game_replays` where ((`game_replays`.`UID` = `game_stats`.`id`) and (`game_replays`.`file` is not null))) <> 0));
DROP TABLE IF EXISTS `replay_vault`;
RENAME TABLE `replay_vault_temp` TO `replay_vault`
Statistics: Posted by RoLa — 25 Feb 2014, 15:20
where ((`game_stats`.`startTime` is not null) and (`game_stats`.`EndTime` is not null) and ((select count(0) from `game_replays` where ((`game_replays`.`UID` = `game_stats`.`id`) and (`game_replays`.`file` is not null))) <> 0))
Statistics: Posted by Ze_PilOt — 25 Feb 2014, 15:15
Statistics: Posted by Ze_PilOt — 25 Feb 2014, 15:14