Add a summary stats "materialized view".
authorAnt Zucaro <azucaro@gmail.com>
Fri, 29 Jan 2016 03:11:18 +0000 (22:11 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 29 Jan 2016 03:11:18 +0000 (22:11 -0500)
build/build_full.sql
tables/summary_stats_mv.tab [new file with mode: 0644]

index 8815186..5af9c6f 100755 (executable)
@@ -1,4 +1,5 @@
 -- drop tables first in reverse order
+drop table if exists summary_stats_mv;
 drop table if exists player_groups;
 drop table if exists player_game_anticheats;
 drop table if exists team_game_stats;
@@ -53,6 +54,7 @@ drop table if exists players cascade;
 \i tables/team_game_stats.tab
 \i tables/player_game_anticheats.tab
 \i tables/player_groups.tab
+\i tables/summary_stats_mv.tab
 
 begin;
 
diff --git a/tables/summary_stats_mv.tab b/tables/summary_stats_mv.tab
new file mode 100644 (file)
index 0000000..c0b6c3f
--- /dev/null
@@ -0,0 +1,9 @@
+CREATE TABLE summary_stats_mv (
+       scope character varying(30),
+       sort_order integer,
+       num_players integer,
+       game_type_cd character varying(10),
+       num_games integer
+);
+
+ALTER TABLE xonstat.summary_stats_mv OWNER TO xonstat;