· 6 years ago · Apr 11, 2019, 04:12 PM
1CREATE KEYSPACE IF NOT EXISTS limitspoc WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
2create table IF NOT EXISTS limitspoc.transactions
3(
4 user_id bigint,
5 transaction_type int,
6 time_uuid timeuuid,
7 transaction_id uuid,
8 amount decimal,
9 primary key ((user_id, transaction_type), time_uuid, transaction_id)
10)
11 with clustering order by (time_uuid desc, transaction_id asc)
12 and caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
13 and compaction = {'max_threshold': '32', 'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
14 and compression = {'class': 'org.apache.cassandra.io.compress.LZ4Compressor', 'chunk_length_in_kb': '64'}
15 and dclocal_read_repair_chance = 0.1;