From: Ant Zucaro Date: Sat, 7 Nov 2015 15:15:54 +0000 (-0500) Subject: Don't put anonymous players in games.players X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0b3f0a95e5999966940d50c9e6861a8fb9d1765c;p=xonotic%2Fxonstat.git Don't put anonymous players in games.players The "games" table has a convenience, de-normalized column for storing the list of player_ids who played in that game. This is intended for use in quick searches. Since anonymous players (players having a player_id == 2) aren't searchable, they don't need to be in this list. This should decrease the overall size of the GIN index on that column over time. --- diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 12e1c65..18ff005 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -912,6 +912,8 @@ def submit_stats(request): if player.player_id > 1: anticheats = create_anticheats(session, pgstat, game, player, events) + + if player.player_id > 2: player_ids.append(player.player_id) if should_do_weapon_stats(game_type_cd) and player.player_id > 1: