From 0b3f0a95e5999966940d50c9e6861a8fb9d1765c Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sat, 7 Nov 2015 10:15:54 -0500 Subject: [PATCH] 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. --- xonstat/views/submission.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- 2.39.2