私はカサンドラの初心者です。そして、複合主キーを持つテーブルがあります。テーブルの説明は、
CREATE TABLE testtable (
foid bigint,
id bigint,
severity int,
category int,
ack boolean,
PRIMARY KEY (foid, id, severity, category)
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
index_interval=128 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
default_time_to_live=0 AND
speculative_retry='NONE' AND
memtable_flush_period_in_ms=0 AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};
私の要件は、foid
with in 条件とid
with range 条件とseverity
with in 条件でテーブルをクエリする必要があることです
だから私は次のクエリを試したとき
select * from testtable where foid in (5,6) and id>10 and severity in (5);
私はエラーメッセージを受け取りました
select * from testtable where foid in (5,6) and id>10 and severity in (5);
または、列の等しい条件でさえ、severity
私には十分ですが、どちらも機能しません。
同じことを達成できる方法はありますか
severity
andのセカンダリ インデックスも試してみましたcategory
が、良い結果は得られませんでした。