I am using Cassandra as the DB, I want to insert a serial number for every record in sequential form for every record, such that every record is unique. So that even if the application crashes, after the restart if any record is inserted then the serial number is the latest one. I have looked for it but haven't found any solution for Cassandra.
The solution I thought of is to get the count(*) of the table and then inserting record with incremented value by 1. But getting count does not seem a good approach as overtime the number of records will be far higher.