Range Queries in Cassandra (CQL 3.0)

后端 未结 2 1529
北恋
北恋 2021-02-14 21:44

One main part of Cassandra that I don\'t fully understand is its range queries. I know that Cassandra emphasizes distributed environment and focuses on performance, but probabl

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-14 22:29

    Apart from the queries you mentioned, you can also have queries on "Composite Key" column families (well you need to design your DB using composite keys, if that fits your constrains). For an example/discussion on this take a look at Query using composite keys, other than Row Key in Cassandra. When using Composite Keys you can perform other types of queries, namely "range" queries that do not use the "partition key" (first element of the composite key) - normally you need to set the "allow filtering" parameter to allow these queries, and also can perform "order by" operations on those elements, which can be very interesting in many situations. I do think that composite key column families allow to overcome several (necessary) "limitations" (to grant performance) of the cassandra data model when compared with the "extremely flexible" (but slow) model of RDBMS...

提交回复
热议问题