]> git.xonotic.org Git - xonotic/xonstatdb.git/blobdiff - scripts/gen_partitions.shl
The games table gets a gin index on players.
[xonotic/xonstatdb.git] / scripts / gen_partitions.shl
index 963f829cdc2bd9d27d01aa9009d42f8da43e10db..b687eef6167483ae13500da58678c86482eff495 100755 (executable)
@@ -35,6 +35,17 @@ do
             printf "CREATE INDEX %s_%s%s_ix002 on %s_%s%s(game_id);\n" $table $year $qtr $table $year $qtr
             printf "CREATE INDEX %s_%s%s_ix003 on %s_%s%s(player_id);\n" $table $year $qtr $table $year $qtr
         fi
+
+        if [[ $table = "team_game_stats" ]]
+        then
+            printf "CREATE INDEX %s_%s%s_ix002 on %s_%s%s(game_id);\n" $table $year $qtr $table $year $qtr
+        fi
+
+        if [[ $table = "games" ]]
+        then
+            printf "CREATE INDEX %s_%s%s_ix002 on %s_%s%s using gin(players);\n" $table $year $qtr $table $year $qtr
+        fi
+
         printf "\n"
     done
 done