How is sorting done in cassandra? [closed]

拜拜、爱过 提交于 2020-01-07 05:29:27

问题


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?


回答1:


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

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)


来源:https://stackoverflow.com/questions/47263785/how-is-sorting-done-in-cassandra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!