I need to store posts from users.
Their usernames are unique and I'm sure they can't make posts at the same millisecond.
Then the URL of their post would contain /Username/12345678890/title-of-the-post
I can't use the Auto_Inc number as I don't know it in the DB.
want them to know the number or be able to guess.
Is this sufficient enough to be unique enough for storage in the DB
If this is the case would the best way to store the unique id in the DB (MySQL)
The PK wouldn't be relative for the URL.
E.g.
AUTO_INCREMENT PK Username createDate (BIGINT)
----------------- -------- -------------------
23456 Daxon 12345678922
Should I be indexing a column?
-- Edit --
I forgot to mention that I don't what the user to know how many posts there are or be able to guess a number for them.
So I thought that currentTime in milliseconds would be unguessable.
Mabye now this value should be encrypted but still URL-SAFE