Rules are made to be broken
If you develop Web applications, you should definitely check out this presentation from Randy Shoup and Dan Pritchett on how eBay scales, not because you should do things the eBay way, but rather because it is a great illustration of how there’s an exception to every rule. When you deal with the traffic and transaction volume that eBay does, the rules that we all play by change radically. For most applications, performance problems arise when your Web pages execute too many SQL statements, and the solution is to sufficiently index your database and use joins wherever possible rather than running additional queries. For example, one common misuse of object-relational mapping libraries results in the “n + 1 selects” problem. When many instances of an object are displayed on one page, the library runs separate queries to retrieve dependent objects, which leads to performance problems. Any decent ORM library has a way to include dependencies in queries for that reason. While most developers spend lots of times trying to retrieve more data using fewer queries, eBay eschews joins. I’d assume they compensate with a lot of caching, but I’d love to hear more of the details. ...