I have an SQL database of unique codes (consiting of numbers/letters).
I want to generate large amount of new codes for this database, that also need to take into account the previous codes that were not generated with any kind of seed or similar.
So, how would I do this the best way? The way it is done currently is that for each code that is generated it loops through all the codes in the database and makes sure the levenshtein distance is not to small. But this takes forever now that the database has grown large.
Any help appreciated. This is used in a ASP.NET C# application.