Originally from the User Slack
@Morten_Bo: Hi
We are looking to use ScyllaDB for storing different types of data in a kind of KeyValue setup where the Value of the Data is JSON/Avro or some other format which can hold multiple records and columns within a single column.
We utilize a PrimaryKey that looks kind of like this:
((datasetid, inserteddate),inserteddatetime,timeuuid)
Since in theory different pieces of data can be submitted for a specific datasetid, inserteddate and inserteddatetime I want to utilize the built in currentTimeUUID() function in my inserts on the table, are there any caveats to using the system-generated timeUUID function (as well as currenttimestamp()) when inserting data?
@Felipe_Cardeneti_Mendes: insertdate
is good for bucketing. But insertdatetime
+ timeuuid
is redundant. You shouldn’t have any collisions just with timeuuid
, and you can filter all records ingested within a given timeuuid
window with the maxTimeuuid()
and minTimeuuid()
functions
@Morten_Bo: I am aware of the redundancy but it is just really nice to be able to visually deduce the timestamp without resorting to using maxtimeuuid() and mintimeuuid() functions. 
I might remove inserteddatetime from the PK and simply have it as a regular column on the table
@Felipe_Cardeneti_Mendes: that would be toTimestamp()
or toUnixTimestamp()
, not max/min. If your use case is append-only, then you can also rely on writetime()
on a regular column to retrieve its epoch. Plenty of options to choose from. 
@Morten_Bo: Fair.
My use case is append-only.
Basically any reading of the data will typically be getting all data for a given dataset in a given timeframe. So can span multiple days and be everything within a day or just a subset of the day. I might play around with different formats.