Why would anyone use a random value as a primary key? I haven’t done databases in a long time but isn’t it standard practice to use a sequential incrementing value for the primary key?
reasons are:
1. no need for coordination in distributed system, no need to check what is the next available id.
2. if userid is visible to users, sequential userid gives away information about the amount of users and allows guessing other valid userids.
This is exactly over engineering and solving for the wrong problem. It can be solved easily d efficiently in other ways.