These "we learned to use the database properly and now the code is much faster"-articles which crop up every now again are fascinating, and speaks a lot about how poorly understood databases are among developers.
Granted, it's not until you have a decent amount of data in the database you actually get a feel for what is fast and what is not, but this kinda does feel like things you should probably know before setting up your database model.