我知道我可以通过cql创建一个表来定义聚类顺序,如下面的代码所示:
create table test(
id int,
time timestamp,
value text,
primary key(id,time)) with clustering order by (time desc)
Run Code Online (Sandbox Code Playgroud)
但是我希望在使用alter创建表之后更改表测试的聚类:
alter table test
with clustering order by (item asc)
Run Code Online (Sandbox Code Playgroud)
但是我得到了错误.谢谢你的帮助.
jbe*_*lis 13
你不能,因为这需要以不同的顺序重写磁盘上的所有数据,同时在运行时求助,直到重写完成,这将导致对性能的不可接受的打击.您需要创建一个新表并将其批量加载.
| 归档时间: |
|
| 查看次数: |
6950 次 |
| 最近记录: |