Please share good ideas implemented poorly you have seen.
For example, in the past 24 hours I have come across 2 such
beasts:
1) A company doing vertical scaling based on username.
Unsurprisingly, they found that 70% of their users had usernames
beginning with 1 of 2 letters. A better idea? Do it by last 2
digits of a user id. That way, even though users are created and
perhaps deleted all the time, the distribution is effectively
random. Language is not.
With 2 significant figures, you can divide vertically many
different ways — 1 large table of all the uids, 2 tables of uids
ending in 00-49 and 50-99, 4 tables, 10 tables, 25 tables, 50
tables, 100 tables. This eliminates the need for a separate table
for each user.
For example, the online dating site I work for uses this method
for messaging. So a user’s inbox is just one part of a table. If
the user has uid 12345, their “Inbox” is the result of …
[Read more]