不同cassandra表中的相同分区键是否合计单元理论极限? [英] Does the same partition key in different cassandra tables add up to cell theoretical limit?

查看:68
本文介绍了不同cassandra表中的相同分区键是否合计单元理论极限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知,Cassandra分区的理论极限是20亿个单元格。但这在下面的情况下如何工作:

It is known that a Cassandra partition has a theoretical limit of 2 billion cells. But how does that work in a situation like this one below:

create table table1 (
    some_id int PRIMARY KEY,
    some_name text
);

create table table2 (
    other_id int PRIMARY KEY,
    other_name text
);

假定表1上的分区(some_id = 1)中有10亿个单元格。
如果我们在table2上还有10亿个单元格在分区中(other_id = 1),那么这些单元格的总和是否达到20亿的理论极限?

Assume we have 1 billion cells in partition (some_id = 1) on table1. If we had another 1 billion cells in partition (other_id = 1) on table2, would those add up to the 2 billion theoretical limit?

,是否将不同表中的相等分区键存储在一起?

In other words, are equal partition keys in different tables stored together?

推荐答案

不同的表具有不同的分区。这使得任何特定分区的结构都是同质的(它将始终遵循单个表的规定架构),从而可以进行优化。

Different tables have different partitions. This makes the structure of any particular partition homogenous (it will always follow the proscribed schema of a single table) which allows for optimizations.

如果您深入了解存储引擎,您会发现每个表甚至都有其自己的目录结构,这清楚地表明,一个表中的分区永远不会交互与另一个分区。 (请参见/ var / lib / cassandra /)

If you look at the storage engine under the hood you'll see that every table even has it's own directory structure making it clear that a partition from one table will never interact with the partition of another. (see /var/lib/cassandra/)

这篇关于不同cassandra表中的相同分区键是否合计单元理论极限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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