incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <aa...@thelastpickle.com>
Subject Re: changing the primary key type of a table
Date Wed, 02 Oct 2013 03:07:16 GMT
> is there any downside using text as primary key? any performance impact on the partition
? 
Nope. 

> There is no way to alter a table's primary key with a cql command, that is what i have
read, migrating to a new table seems to be the only way.
Yup.

> Is there any good recommendation how to do this? cqlsh copy or jsonsttable seems like
will all result in same datatype as before.
* create the new table
* backfill data to it while your app is writing to both the old and the new
* stop writing to the old
* drop the old. 


Cheers

-----------------
Aaron Morton
New Zealand
@aaronmorton

Co-Founder & Principal Consultant
Apache Cassandra Consulting
http://www.thelastpickle.com

On 28/09/2013, at 4:05 AM, Jimmy Lin <y2klyf+work@gmail.com> wrote:

> hi,
> we have a table that its primary key is uuid type. Now we decide that we need to use
text type as it is more flexible for our application.
>  
> #1
> is there any downside using text as primary key? any performance impact on the partition
? 
>  
> #2
> There is no way to alter a table's primary key with a cql command, that is what i have
read, migrating to a new table seems to be the only way.
> Is there any good recommendation how to do this? cqlsh copy or jsonsttable seems like
will all result in same datatype as before.
>  
> thanks
>  


Mime
View raw message