incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Bointon <mar...@synchromedia.co.uk>
Subject Appending to fields
Date Tue, 31 May 2011 19:22:38 GMT
I'm wondering how cassandra implements appending values to fields. Since (so the docs tell
me) there's not really any such thing such thing as an update in Cassandra, I wonder if it
falls into the same trap as MySQL does. With a query like "update x set y = concat(y, 'a')
where id = 1", mysql reads the entire value of y, appends the data, then writes the whole
thing back, which unfortunately is an O(n^2) operation. The situation I'm doing this in involves
what amount to log files on hundreds of thousands of items, many of which might need updating
at once, so they're all simple appends, but it becomes unusably slow very quickly. In MySQL
it's just a plain bug as it could optimise this by appending data at a known offset and then
bumping up the field length counter, which is back in at least O(n) territory. Does cassandra's
design avoid this problem?

Marcus
Mime
View raw message