gpt4 book ai didi

cassandra - 如何在 Cassandra 中启用物化 View ?

转载 作者:行者123 更新时间:2023-12-05 09:28:36 30 4
gpt4 key购买 nike

create materialized view if not exists s.emp
as
select id, count(name) as count from employee primary key (name);

查询 1 错误:实体化 View 被禁用。在 cassandra.yaml 中启用即可使用。

最佳答案

您需要将以下行添加到 cassandra.yaml 以启用物化 View :

materialized_views_enabled: true

您需要在集群的所有节点上启用它,然后执行滚动重启以使更改生效。

请注意,MV 被认为是实验性的,这就是默认情况下禁用它们的原因。正如我在本文中所讨论的那样,在将 MV 用于生产之前,请注意其优缺点 -- https://community.datastax.com/articles/2774/ .

有关物化 View 实验状态的更多信息,请参阅 NEWS.txt 中的条目在 Github 上。干杯!

关于cassandra - 如何在 Cassandra 中启用物化 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71216682/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com