From 4fa59707ed3fcc2aa128d6c924f11cdef42674a3 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sat, 18 Nov 2017 09:06:52 -0500 Subject: [PATCH] Add indexes on the game_id field. --- tables/player_game_frag_matrix.tab | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tables/player_game_frag_matrix.tab b/tables/player_game_frag_matrix.tab index cf309cd..c41b79b 100755 --- a/tables/player_game_frag_matrix.tab +++ b/tables/player_game_frag_matrix.tab @@ -22,6 +22,7 @@ WITH ( ); CREATE INDEX player_game_frag_matrix_ix01 on player_game_frag_matrix(create_dt); +CREATE INDEX player_game_frag_matrix_ix02 on player_game_frag_matrix(game_id); ALTER TABLE xonstat.player_game_frag_matrix OWNER TO xonstat; @@ -30,81 +31,95 @@ CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2017q3 ( ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2017q3_ix001 on player_game_frag_matrix_2017q3(create_dt); +CREATE INDEX player_game_frag_matrix_2017q3_ix002 on player_game_frag_matrix_2017q3(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2017q4 ( CHECK ( create_dt >= DATE '2017-10-01' AND create_dt < DATE '2018-01-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2017q4_ix001 on player_game_frag_matrix_2017q4(create_dt); +CREATE INDEX player_game_frag_matrix_2017q4_ix002 on player_game_frag_matrix_2017q4(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2018q1 ( CHECK ( create_dt >= DATE '2018-01-01' AND create_dt < DATE '2018-04-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2018q1_ix001 on player_game_frag_matrix_2018q1(create_dt); +CREATE INDEX player_game_frag_matrix_2018q1_ix002 on player_game_frag_matrix_2018q1(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2018q2 ( CHECK ( create_dt >= DATE '2018-04-01' AND create_dt < DATE '2018-07-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2018q2_ix001 on player_game_frag_matrix_2018q2(create_dt); +CREATE INDEX player_game_frag_matrix_2018q2_ix002 on player_game_frag_matrix_2018q2(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2018q3 ( CHECK ( create_dt >= DATE '2018-07-01' AND create_dt < DATE '2018-10-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2018q3_ix001 on player_game_frag_matrix_2018q3(create_dt); +CREATE INDEX player_game_frag_matrix_2018q3_ix002 on player_game_frag_matrix_2018q3(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2018q4 ( CHECK ( create_dt >= DATE '2018-10-01' AND create_dt < DATE '2019-01-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2018q4_ix001 on player_game_frag_matrix_2018q4(create_dt); +CREATE INDEX player_game_frag_matrix_2018q4_ix002 on player_game_frag_matrix_2018q4(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2019q1 ( CHECK ( create_dt >= DATE '2019-01-01' AND create_dt < DATE '2019-04-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2019q1_ix001 on player_game_frag_matrix_2019q1(create_dt); +CREATE INDEX player_game_frag_matrix_2019q1_ix002 on player_game_frag_matrix_2019q1(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2019q2 ( CHECK ( create_dt >= DATE '2019-04-01' AND create_dt < DATE '2019-07-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2019q2_ix001 on player_game_frag_matrix_2019q2(create_dt); +CREATE INDEX player_game_frag_matrix_2019q2_ix002 on player_game_frag_matrix_2019q2(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2019q3 ( CHECK ( create_dt >= DATE '2019-07-01' AND create_dt < DATE '2019-10-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2019q3_ix001 on player_game_frag_matrix_2019q3(create_dt); +CREATE INDEX player_game_frag_matrix_2019q3_ix002 on player_game_frag_matrix_2019q3(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2019q4 ( CHECK ( create_dt >= DATE '2019-10-01' AND create_dt < DATE '2020-01-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2019q4_ix001 on player_game_frag_matrix_2019q4(create_dt); +CREATE INDEX player_game_frag_matrix_2019q4_ix002 on player_game_frag_matrix_2019q4(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2020q1 ( CHECK ( create_dt >= DATE '2020-01-01' AND create_dt < DATE '2020-04-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2020q1_ix001 on player_game_frag_matrix_2020q1(create_dt); +CREATE INDEX player_game_frag_matrix_2020q1_ix002 on player_game_frag_matrix_2020q1(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2020q2 ( CHECK ( create_dt >= DATE '2020-04-01' AND create_dt < DATE '2020-07-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2020q2_ix001 on player_game_frag_matrix_2020q2(create_dt); +CREATE INDEX player_game_frag_matrix_2020q2_ix002 on player_game_frag_matrix_2020q2(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2020q3 ( CHECK ( create_dt >= DATE '2020-07-01' AND create_dt < DATE '2020-10-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2020q3_ix001 on player_game_frag_matrix_2020q3(create_dt); +CREATE INDEX player_game_frag_matrix_2020q3_ix002 on player_game_frag_matrix_2020q3(game_id); CREATE TABLE IF NOT EXISTS xonstat.player_game_frag_matrix_2020q4 ( CHECK ( create_dt >= DATE '2020-10-01' AND create_dt < DATE '2021-01-01' ) ) INHERITS (player_game_frag_matrix); CREATE INDEX player_game_frag_matrix_2020q4_ix001 on player_game_frag_matrix_2020q4(create_dt); +CREATE INDEX player_game_frag_matrix_2020q4_ix002 on player_game_frag_matrix_2020q4(game_id); -- 2.39.2