[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to avoid lightwieght transactions

Hi all,
we have a use case where we need to update frequently our rows. Now in order to do so and so that we dont override updates we have to resort to lightweight transactions. 
Since lightweight is expensive(could be 4 times as expensive as normal insert) , how do we model around it.

e.g i have a table where 

CREATE TABLE multirow (

    id text,

    time text,

    transcation_type text,

    status text,

    PRIMARY KEY (id, time)

So lets say we update status column multiple times. So first time we update we also have to make sure that the transaction exists otherwise normal update will insert it and then the original insert comes in and it will override the update.

So in order to fix that we need to use light weight transactions.

Is there another way i can model this so that we can avoid the lightweight transactions.