There are millions of user accounts, and I want to distribute their data into N tables(user_1, user_2,..., user_N) of a database. User accounts are comprised of 3~8 characters. So, I want a function that returns table suffix like
int getTableSuffix(String userAccount);
The result is a uniform distribution from 1 to N.
Do you know any cheap hash algorithm for this job?