Carlos Valencia
09/16/2022, 6:40 AMJohann Pardanaud
09/16/2022, 7:41 AMRohde Fischer
09/16/2022, 7:45 AMSEQUENCE
, auto_increment
or whatever that beast is named in your DB
if you need any kind of FIFO order of your things, I recommend timestamps and accepting that you will not (and cannot - ever!) get true FIFO, so if you get two identical timestamps, just accept the random order, it's not a problem (reason you cannot get true FIFO anyway is IO latencies and the unpredictable nature of IT systems as a whole, the idea of everything being perfectly up to date is an illusion anyway)
which leads me to the next point. Are you really sure that you want incremental numbers for your IDs? Probably you will be better off using `UUID`s, which removed the need for DB logic for atomicity to begin with and is much more scalable and robust in the long run (at least for most cases)Johann Pardanaud
09/16/2022, 7:46 AMJohann Pardanaud
09/16/2022, 7:51 AMCarlos Valencia
09/16/2022, 12:55 PM