Do you know how many time takes to insert 4Gb of data into a DB, since this 4Gb has 150.000.000 entries, than export this data? Tooo muuuchhh! Now add the insertion of a random unique ID, since for each random ID to insert we need to check if it's already in use, what need an index. The concept to create a new SORTED unique ID into a DB is just MAX_ID+1, that is simple, and for a RANDOM unique ID is while( !indexed( rand(N) ) ).