clickhouse在集群上加入表

发布于 2025-02-03 06:18:09 字数 288 浏览 2 评论 0原文

我们有一个带有2个副本和1个碎片的Clickhouse群集,并且在该群集上有一个联接表:

create table joinTable on cluster 'mycluster'
(
    a String,
    b String
)
engine = Join(ALL, INNER, a);

当我们将数据插入表格时,它仅用于其中一个副本。 我们还需要突变,因此我们不能在联接表上使用分布式表。

我们如何将数据插入所有复制品?

有没有办法直接与每个复制品合作?

We have a ClickHouse cluster with 2 replicas and 1 shard and we have a join table on that cluster:

create table joinTable on cluster 'mycluster'
(
    a String,
    b String
)
engine = Join(ALL, INNER, a);

When we insert data to the table it goes only to one of the replicas.
we also need mutations so we can't use distributed table over the join tables.

How can we insert data to all replicas?

Is there a way to work with each replica directly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只是偏爱你 2025-02-10 06:18:09

据我所知,不可能这样做。这是一个内存表,因此您需要在每个节点上创建它并管理客户端的插入。

It's not possible to do it as far as I know. It's an in-memory table, so you would need to create it on every single node and manage insertion on the client side.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文