cassandra - 日期和时间条件不起作用的地方

标签 cassandra cqlsh

我想执行这个查询,

从 standardevents0805 中选择 uuid、数据、名称、时间、跟踪器、类型、用户 ID 其中时间 > '2014/08/04 00:00:00'; (我尝试也加双引号“2014/08/04 00:00:00”)

但它无法正常工作。

下面是我的专栏系列的描述,

CREATE TABLE standardevents0805 (
  uuid timeuuid PRIMARY KEY,
  data text,
  name text,
  time timestamp,
  tracker text,
  type text,
  userid text
) 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
  read_repair_chance=0.100000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'SnappyCompressor'};

CREATE INDEX time_in ON standardevents0805 (time);

CREATE INDEX userid_in ON standardevents0805 (userid);

最佳答案

您已按时放置了查找索引,但此类索引(在撰写本文时)仅允许等于操作。范围查询只能针对聚类键进行。

关于cassandra - 日期和时间条件不起作用的地方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25134126/

相关文章:

hadoop - Giraph、Hadoop、Spark 和 Cassandra

python - 使用python时cassandra错误 "Batch too large"

Cassandra cqlsh 查询失败,没有错误

Node.JS 提高 cassandra 性能

cassandra - 主键相关的CQL3查询排序时的情况和错误

java - 从Spark Workers将数据从SparkStreaming保存到Cassandra是否可行

用于表行为的 cassandra TTL

mysql - 数百万人的高效私有(private)消息传递解决方案?

cassandra - Apache Cassandra 3.7 CQLSH 'Unable to connect to any servers'

cassandra - Apache Cassandra : Nodetool Stats Which shows Memtable Flush Frequency