cassandra - 在 cassandra 中启用读取后,磁盘 io 已增加
问题描述
启用读取后磁盘 io 已增加。它是一个带有 RF 3 的 10 节点集群。响应时间也很长。我们正在使用以下查询来读取数据。有人可以帮助解决/克服这个问题。
不。节点数:10 存储:SSD 操作系统:Centos 7 版本:3.10 读取:1000/分钟
询问:
SELECT * FROM Test.table_A WHERE user_id = ? AND group_type = ? ORDER BY group_type ASC , action_type ASC , created_at DESC LIMIT 500;
SELECT * FROM Test.table_A WHERE user_id = 98765432 AND group_type = abc LIMIT 100;
SELECT * FROM Test.table_A WHERE user_id = 10999222 AND group_type = xyz LIMIT 500;
该表的架构
CREATE TABLE Test.table_A (
user_id text,
group_type text,
action_type text,
created_at timestamp,
asset_type text,
content_type text,
engage_level text,
group_id text,
item_id text,
item_igs text,
ui_type text,
PRIMARY KEY (user_id, group_type, action_type, created_at)
) WITH CLUSTERING ORDER BY (group_type ASC, action_type ASC, created_at DESC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = 'User page view activity is maintained in this table'
AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '3', 'compaction_window_unit': 'DAYS', 'max_threshold': '32', 'min_threshold': '4', 'unchecked_tombstone_compaction': 'true'}
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 = 1296000
AND gc_grace_seconds = 86400
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';
解决方案
推荐阅读
- reporting-services - SSRS 报告停止加载(超时),其中 SQL 查询在 48 秒内提取数据
- javascript - 为什么我必须在js闹钟中输入军用时间而不是“小时+经络”?
- node.js - 必须提供源或客户条带直播模式
- html - 为什么我的移动网站显示我的桌面网站,但是当我在手机上请求桌面网站时,它会显示移动网站?
- amazon-dynamodb - 如何使用 AWS Cli 更新 DynamoDB 中的现有表名?
- java - Java Spring:我的 POST 方法没有从我的关系中插入 id
- amp-html - 如何在不执行任何操作的情况下使用 amp-state 获取数据
- asp.net-core - APS.NET core 2.2 实体框架数据库迁移寻找主键
- c# - 具有自动完成功能的文本框不会执行 key_press 事件
- c++ - 程序输入名称和高度并显示它。我不知道如何在列表中显示最高人的姓名和身高