cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karim abbouh <karim_...@yahoo.fr>
Subject Re : last record rowId
Date Fri, 17 Jun 2011 17:00:48 GMT
is there any way to remember the keys (rowId) inserted in cassandra database?
B.R



________________________________
De : Jonathan Ellis <jbellis@gmail.com>
À : user@cassandra.apache.org
Cc : karim abbouh <karim_rbt@yahoo.fr>
Envoyé le : Mercredi 15 Juin 2011 18h05
Objet : Re: last record rowId

You're better served using UUIDs than numeric row IDs for surrogate
keys.  (Of course natural keys work fine too.)

On Wed, Jun 15, 2011 at 9:16 AM, Utku Can Topçu <utku@topcu.gen.tr> wrote:
> As far as I can tell, this functionality doesn't exist.
>
> However you can use such a method to insert the rowId into another column
> within a seperate row, and request the latest column.
> I think this would work for you. However every insert would need a get
> request, which I think would be performance issue somehow.
>
> Regards,
> Utku
>
> On Wed, Jun 15, 2011 at 11:14 AM, karim abbouh <karim_rbt@yahoo.fr> wrote:
>>
>> in my java application,when we try to insert we should all the time know
>> the last rowId
>> in order the insert the new record in rowId+1,so for that we should save
>> this rowId in a file
>> is there other way to know the last record rowId?
>> thanks
>> B.R
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Mime
View raw message