From: Ant Zucaro Date: Fri, 29 Jan 2016 03:11:18 +0000 (-0500) Subject: Add a summary stats "materialized view". X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonstatdb.git;a=commitdiff_plain;h=2fb4bf3cf76c6a27be0718c008c64aa9bf23c662 Add a summary stats "materialized view". --- 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;