The database doesn't need to be an issue - it just currently is. We have a fairly complex query on a several terabyte large PostgreSQL database and didn't want to spend more money. Basically, we just haven't sharded it yet, and don't want to pay for a larger machine. The point is - typically the issue isn't the web app. Almost all web frameworks are designed to be scalable from the start. Just launch another instance.
Also, we do about 99 writes for every 1 read, so query times don't matter as much. For the given app I was using as an example.
Network I/O and large databases are usually the bottlenecks from what I've seen consulting and developing.