【发布时间】:2019-07-16 13:50:45
【问题描述】:
我有一个表订阅者,其中将包含数百万条数据。
表模式在 cassandra 中如下所示 -
CREATE TABLE susbcriber (
id int PRIMARY KEY,
age_identifier text,
alternate_mobile_identifier text,
android_identifier text,
batch_id text,
circle text,
city_identifier text,
country text,
country_identifier text,
created_at text,
deleted_at text,
email_identifier text,
gender_identifier text,
ios_identifier text,
list_master_id int,
list_subscriber_id text,
mobile_identifier text,
operator text,
partition_id text,
raw_data map<text, text>,
region_identifier text,
unique_identifier text,
updated_at text,
web_push_identifier text
) 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 = 0
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';
我必须主要在'raw_data map<text, text>,' 上进行过滤查询,此列包含 JSON 值和键,我如何对数据进行建模以便 选择和更新必须在性能上快速?
我正在尝试实现一些批量更新操作。
非常感谢任何建议。
【问题讨论】:
标签: cassandra data-modeling cassandra-3.0 cqlsh