From 2fb4bf3cf76c6a27be0718c008c64aa9bf23c662 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Thu, 28 Jan 2016 22:11:18 -0500 Subject: [PATCH] Add a summary stats "materialized view". --- build/build_full.sql | 2 ++ tables/summary_stats_mv.tab | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 tables/summary_stats_mv.tab diff --git a/build/build_full.sql b/build/build_full.sql index 8815186..5af9c6f 100755 --- a/build/build_full.sql +++ b/build/build_full.sql @@ -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 index 0000000..c0b6c3f --- /dev/null +++ b/tables/summary_stats_mv.tab @@ -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; -- 2.39.2