cassandra best practise

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cassandra best practise相关的知识,希望对你有一定的参考价值。

modeling by query.

secondary index is best on table that has many rows the contain fewer unique values (low cardinality). but,

don‘t index on high-cardinality columns,

don‘t index in table which has a counter column,

don‘t index on a frequently updated or deleted column,

don‘t abuse the index to look for a row in a large partition

 

primary key 包含rowkeys, clustering columns. 

the colustering columns are used to locate a unique record, they are ordered, by default, and have the ability to use the order by clause in the select statements, as well as MIN, MAX, LIMIT

 

date bucket pattern, partitioning by date in row keys.

 

range query on partition: 使用token function。

 

if the primary column contains only one column, the row is skinny row, otherwise, the primary key contains more than one column, it‘s called wide row.

 

valueless column,即 column value可为null。

 

以上是关于cassandra best practise的主要内容,如果未能解决你的问题,请参考以下文章

系列 | Cassandra 数据模型设计最佳实践(上)

Cassandra 数据模型设计,根据你的查询来制定设计——反范式设计本质:空间换时间

best performance / best appearance

Cassandra基本介绍 - Cassandra概述

Cassandra数据库从入门到精通系列之一:认识Cassandra数据库

如何在spark中读写cassandra数据