开发者

How to change the key of row in cassandra?

开发者 https://www.devze.com 2023-04-12 18:22 出处:网络
I need to change(to update it with new value) the key of row in cassandra. How can i do that? Of course i can select all rows with previos key and then insert their columns with new key, and delete th

I need to change(to update it with new value) the key of row in cassandra. How can i do that? Of course i can select all rows with previos key and then insert their columns with new key, and delete th开发者_StackOverflow中文版e previos rows. this is too hard. maybe there is another way to solve this prolem?


Unfortunately you can't change the key of a row - that would incur too much overhead (for example, you might have to move the row to a different host).


What you could do is copy the entire row and insert it again with your new row key.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号