Skip to content

Instantly share code, notes, and snippets.

@gjaldon
Last active December 30, 2019 17:31
Show Gist options
  • Save gjaldon/1c45a1d678b456fbc79e40503b4d4c38 to your computer and use it in GitHub Desktop.
Save gjaldon/1c45a1d678b456fbc79e40503b4d4c38 to your computer and use it in GitHub Desktop.
Scylla Initial Schema
CREATE MATERIALIZED VIEW league_stats.encrypted_summoner_account_by_account_id AS
SELECT *
FROM league_stats.encrypted_summoner_accounts
WHERE region IS NOT NULL AND account_id IS NOT NULL AND summoner_id IS NOT NULL AND encrypted_account_id IS NOT NULL AND encrypted_summoner_id IS NOT NULL
PRIMARY KEY ((region, account_id), summoner_id, encrypted_account_id, encrypted_summoner_id)
WITH CLUSTERING ORDER BY (summoner_id ASC, encrypted_account_id ASC, encrypted_summoner_id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE MATERIALIZED VIEW league_stats.encrypted_summoner_account_by_account_id AS
SELECT *
FROM league_stats.encrypted_summoner_accounts
WHERE region IS NOT NULL AND account_id IS NOT NULL AND summoner_id IS NOT NULL AND encrypted_account_id IS NOT NULL AND encrypted_summoner_id IS NOT NULL
PRIMARY KEY ((region, account_id), summoner_id, encrypted_account_id, encrypted_summoner_id)
WITH CLUSTERING ORDER BY (summoner_id ASC, encrypted_account_id ASC, encrypted_summoner_id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE MATERIALIZED VIEW league_stats.encrypted_summoner_account_by_summoner_id AS
SELECT *
FROM league_stats.encrypted_summoner_accounts
WHERE region IS NOT NULL AND summoner_id IS NOT NULL AND account_id IS NOT NULL AND encrypted_account_id IS NOT NULL AND encrypted_summoner_id IS NOT NULL
PRIMARY KEY ((region, summoner_id), account_id, encrypted_account_id, encrypted_summoner_id)
WITH CLUSTERING ORDER BY (account_id ASC, encrypted_account_id ASC, encrypted_summoner_id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE MATERIALIZED VIEW league_stats.league_rank_by_season_v4_positional AS
SELECT *
FROM league_stats.league_rank_stats_v4_positional
WHERE region IS NOT NULL AND summoner_id IS NOT NULL AND season IS NOT NULL AND queue_type IS NOT NULL AND summoner_name IS NOT NULL AND account_id IS NOT NULL AND position IS NOT NULL
PRIMARY KEY ((region, summoner_id), season, queue_type, summoner_name, account_id, position)
WITH CLUSTERING ORDER BY (season ASC, queue_type ASC, summoner_name ASC, account_id ASC, position ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE MATERIALIZED VIEW league_stats.match_list_by_queue_v4 AS
SELECT *
FROM league_stats.league_match_list_games
WHERE region IS NOT NULL AND account_id IS NOT NULL AND queue IS NOT NULL AND timestamp IS NOT NULL AND game_id IS NOT NULL AND season IS NOT NULL AND champion IS NOT NULL
PRIMARY KEY ((region, account_id, queue), timestamp, game_id, season, champion)
WITH CLUSTERING ORDER BY (timestamp DESC, game_id ASC, season ASC, champion ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '7', 'compaction_window_unit': 'DAYS', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE MATERIALIZED VIEW league_stats.profile_clean_by_summoner_id_v4 AS
SELECT *
FROM league_stats.league_profiles_cleaned_v4
WHERE region IS NOT NULL AND summoner_id IS NOT NULL AND account_id IS NOT NULL AND summoner_key IS NOT NULL
PRIMARY KEY ((region, summoner_id), account_id, summoner_key)
WITH CLUSTERING ORDER BY (account_id ASC, summoner_key ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE MATERIALIZED VIEW league_stats.profile_clean_by_summoner_name_v4 AS
SELECT *
FROM league_stats.league_profiles_cleaned_v4
WHERE region IS NOT NULL AND summoner_key IS NOT NULL AND account_id IS NOT NULL AND summoner_id IS NOT NULL
PRIMARY KEY ((region, summoner_key), account_id, summoner_id)
WITH CLUSTERING ORDER BY (account_id ASC, summoner_id ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE MATERIALIZED VIEW league_stats.summoner_account_by_encrypted_account_id AS
SELECT *
FROM league_stats.encrypted_summoner_accounts
WHERE region IS NOT NULL AND encrypted_account_id IS NOT NULL AND summoner_id IS NOT NULL AND account_id IS NOT NULL AND encrypted_summoner_id IS NOT NULL
PRIMARY KEY ((region, encrypted_account_id), summoner_id, account_id, encrypted_summoner_id)
WITH CLUSTERING ORDER BY (summoner_id ASC, account_id ASC, encrypted_summoner_id ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE KEYSPACE league_stats WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;
CREATE TABLE league_stats.matchup_stats_full (
patch text,
region text,
queue text,
tier text,
champion_id int,
opponent_champion_id int,
role text,
stats text,
PRIMARY KEY ((patch, region, queue, tier, champion_id), opponent_champion_id, role)
) WITH CLUSTERING ORDER BY (opponent_champion_id ASC, role ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.matchup_stats_aggregate (
tier_block text,
patch text,
champion_id int,
opponent_champion_id int,
role text,
data text,
PRIMARY KEY ((tier_block, patch, champion_id), opponent_champion_id, role)
) WITH CLUSTERING ORDER BY (opponent_champion_id ASC, role ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.duo_stat_full_aggregate (
patch text,
region text,
queue text,
tier text,
role text,
duo_role text,
champion_id int,
duo_champion_id int,
data text,
PRIMARY KEY ((patch, region, queue, tier, role, duo_role), champion_id, duo_champion_id)
) WITH CLUSTERING ORDER BY (champion_id ASC, duo_champion_id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.duo_stat_aggregate (
tier_block text,
patch text,
role text,
duo_role text,
champion_id int,
duo_champion_id int,
data text,
PRIMARY KEY ((tier_block, patch, role, duo_role), champion_id, duo_champion_id)
) WITH CLUSTERING ORDER BY (champion_id ASC, duo_champion_id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.champion_stats_full (
patch text,
region text,
queue text,
tier text,
champion_id int,
role text,
stats text,
PRIMARY KEY ((patch, region, queue, tier), champion_id, role)
) WITH CLUSTERING ORDER BY (champion_id ASC, role ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.champion_stats_full_aggregate (
patch text,
region text,
queue text,
tier text,
champion_id int,
role text,
data text,
PRIMARY KEY ((patch, region, queue, tier, champion_id), role)
) WITH CLUSTERING ORDER BY (role ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.league_rank_stats_v4_positional (
region text,
summoner_id text,
queue_type text,
account_id text,
season int,
position text,
last_updated timestamp,
league_id text,
league_name text,
league_points int,
losses int,
rank int,
series text,
summoner_name text,
tier text,
wins int,
PRIMARY KEY ((region, summoner_id), queue_type, account_id, season, position)
) WITH CLUSTERING ORDER BY (queue_type ASC, account_id ASC, season ASC, position ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.league_profiles_cleaned_v4 (
region text,
account_id text,
summoner_key text,
summoner_id text,
last_rank_updated timestamp,
last_stat_flex_tt_updated timestamp,
last_stat_flex_updated timestamp,
last_stat_updated timestamp,
last_updated timestamp,
latest_stat_game_id bigint,
profile_icon_id int,
summoner_level int,
summoner_name text,
PRIMARY KEY ((region, account_id), summoner_key, summoner_id)
) WITH CLUSTERING ORDER BY (summoner_key ASC, summoner_id ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.league_match_list_games (
region text,
account_id text,
timestamp timestamp,
game_id bigint,
season int,
queue int,
champion int,
lane text,
role text,
PRIMARY KEY ((region, account_id), timestamp, game_id, season, queue, champion)
) WITH CLUSTERING ORDER BY (timestamp DESC, game_id ASC, season ASC, queue ASC, champion ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '7', 'compaction_window_unit': 'DAYS', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 3024000
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.champion_ban_full (
patch text,
region text,
queue text,
tier text,
champion_id int,
ban_count counter,
PRIMARY KEY ((patch, region, queue, tier), champion_id)
) WITH CLUSTERING ORDER BY (champion_id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.items (
patch text,
id int,
data text,
tier text,
PRIMARY KEY (patch, id)
) WITH CLUSTERING ORDER BY (id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.league_rank_leagues (
region text,
league_id text,
data text,
last_updated timestamp,
season int,
PRIMARY KEY ((region, league_id))
) WITH bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.notification_toast (
key text PRIMARY KEY,
message text
) WITH bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.patches (
key text,
major_version int,
minor_version int,
patch text,
games counter,
PRIMARY KEY (key, major_version, minor_version, patch)
) WITH CLUSTERING ORDER BY (major_version DESC, minor_version DESC, patch ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.patches_time (
key text,
patch text,
patch_time timestamp,
PRIMARY KEY (key, patch, patch_time)
) WITH CLUSTERING ORDER BY (patch ASC, patch_time ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.player_champion_stats_queue (
region text,
queue_type text,
account_id bigint,
season int,
champion_id bigint,
data text,
last_game_id bigint,
last_game_timestamp timestamp,
PRIMARY KEY ((region, queue_type, account_id, season), champion_id)
) WITH CLUSTERING ORDER BY (champion_id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.player_champion_stats_queue_v4 (
region text,
queue_type text,
account_id text,
season int,
champion_id bigint,
data text,
last_game_id bigint,
last_game_timestamp timestamp,
PRIMARY KEY ((region, queue_type, account_id, season), champion_id)
) WITH CLUSTERING ORDER BY (champion_id ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.games (
region text,
game_id bigint,
data text,
parsed boolean,
patch text,
PRIMARY KEY ((region, game_id))
) WITH bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
CREATE TABLE league_stats.champion_ban_tier_blocks (
patch text,
tier_block text,
champion_id int,
ban_count counter,
PRIMARY KEY ((patch, tier_block), champion_id)
) WITH CLUSTERING ORDER BY (champion_id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.champion_stats_tier_block (
tier_block text,
patch text,
champion_id int,
role text,
stats text,
PRIMARY KEY ((tier_block, patch), champion_id, role)
) WITH CLUSTERING ORDER BY (champion_id ASC, role ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.champion_stats_aggregate_fixed (
tier_block text,
patch text,
champion_id int,
role text,
data text,
PRIMARY KEY ((tier_block, patch, champion_id), role)
) WITH CLUSTERING ORDER BY (role ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.matchup_stats_full_aggregate (
patch text,
region text,
queue text,
tier text,
champion_id int,
opponent_champion_id int,
role text,
data text,
PRIMARY KEY ((patch, region, queue, tier, champion_id), opponent_champion_id, role)
) WITH CLUSTERING ORDER BY (opponent_champion_id ASC, role ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE TABLE league_stats.encrypted_summoner_accounts (
region text,
account_id bigint,
summoner_id bigint,
encrypted_account_id text,
encrypted_summoner_id text,
PRIMARY KEY ((region, account_id, summoner_id), encrypted_account_id, encrypted_summoner_id)
) WITH CLUSTERING ORDER BY (encrypted_account_id ASC, encrypted_summoner_id ASC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL","rows_per_partition":"ALL"}'
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
ALTER TABLE league_stats.matchup_stats_full_aggregate WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.champion_stats_aggregate_fixed WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.champion_stats_tier_block WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.champion_ban_tier_blocks WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.patches_time WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.notification_toast WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.items WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.champion_ban_full WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.champion_stats_full WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.duo_stat_aggregate WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.duo_stat_full_aggregate WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.matchup_stats_full WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER MATERIALIZED VIEW league_stats.encrypted_summoner_account_by_account_id WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER MATERIALIZED VIEW league_stats.encrypted_summoner_account_by_summoner_id WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER MATERIALIZED VIEW league_stats.league_rank_by_season_v4_positional WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.encrypted_summoner_accounts WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
ALTER TABLE league_stats.games WITH gc_grace_seconds = 864000 AND compaction = {'class': 'SizeTieredCompactionStrategy', 'min_threshold': '4'};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment