Redian新闻
>
这个cassandra paging的解决方案怎么样?
avatar
这个cassandra paging的解决方案怎么样?# DataSciences - 数据科学
f*e
1
As paging is a big issue of Cassandra. I have a strategy to page using
secondary index: Add a column "page_number" corresponding to each column you
want to sort and page, create an index on the "page_number" column or just
use it as the clustering column. The "page_number" is a good candidate for
indexing, since it has low cardinality: every entry in the same page has the
same page number. If there are 100 entries in one page, then there are 100
entries with the same page number. Thus is low cardinality. We can order the
entries according to each column and set the corresponding "page_number".
You can retrieve one page and do the corresponding sorting and send to
display. Is this a good way or not?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。