cassandra中的排序方式如何? [英] How is sorting done in cassandra?

查看:93
本文介绍了cassandra中的排序方式如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Cassandra的新手。
Cassandra是否遵循任何指定的排序算法,例如气泡排序二进制排序等?如果不是,它将如何按命令排序?

I am a newbie in Cassandra. Does Cassandra follow any specified sorting algorithm like bubble sort, binary sort, etc.? If not, How does it sort in order by command?

推荐答案

不是,或者至少不是。在Cassandra中,您将围绕用例构建数据模型。因此,如果要检索排序的数据,则必须将其存储为排序的。如果您希望以不同的方式对相同的数据进行排序,那么您将存储相同的数据多次以不同的方式进行排序。关于Cassandra的工作原理,还有很多要阅读的内容,我认为Cassandra的每个用户都应该这样做。

It doesn't, or at least it shouldn't. In Cassandra you build your data model around your use cases. So if you want to retrieve sorted data you have to store it sorted. If you want the same data sorted in different ways, you store the same data multiple times sorted differently. There is a lot more to read about how Cassandra works, and I think every user of Cassandra should.

与您的问题相关的链接:

Links related to your question:

  • https://docs.datastax.com/en/cql/3.3/cql/cql_using/useSimplePrimaryKeyConcept.html
  • https://docs.datastax.com/en/cql/3.3/cql/cql_using/useCompoundPrimaryKeyConcept.html
  • https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlCreateIndex.html

Cassandra入门:

Getting started with Cassandra:

  • https://academy.datastax.com/courses (the first two courses is a must do. You need to register but they 100% free)

这篇关于cassandra中的排序方式如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆