]> git.xonotic.org Git - xonotic/xonstatdb.git/blobdiff - scripts/refresh_recent_game_stats_mv.sql
Create the index on the new table, not the old one.
[xonotic/xonstatdb.git] / scripts / refresh_recent_game_stats_mv.sql
index 8ab82119f2df432441f324dce12877324bb8f147..a158640d7769e9ff64f9f2f6903047ce1ced3880 100644 (file)
@@ -16,8 +16,8 @@ BEGIN;
     AND g.create_dt BETWEEN (now() at time zone 'UTC' - interval '30 days') AND (now() at time zone 'UTC' + interval '1 day');
 
     -- Index it
-    CREATE INDEX recent_game_stats_mv_new_ix001 on recent_game_stats(server_id);
-    CREATE INDEX recent_game_stats_mv_new_ix002 on recent_game_stats(map_id);
+    CREATE INDEX recent_game_stats_mv_new_ix001 on recent_game_stats_mv_new(server_id);
+    CREATE INDEX recent_game_stats_mv_new_ix002 on recent_game_stats_mv_new(map_id);
 
     -- Drop the old stuff, rename the stuff
     DROP TABLE IF EXISTS recent_game_stats_mv CASCADE;