3 ms·
I've found that it's better to have queries be pretty simple and do any necessary complex aggregations or analysis in the app tier since it's better to let the
by narrator 10y ago
I've found that it's better to have queries be pretty simple and do any necessary complex aggregations or analysis in the app tier since it's better to let the database's CPU think about doing I/O and cache management rather than business logic. It's also easier to scale out the app tier as you can bring app tier instances up and down easily via AWS vs having to copy a lot of data around to bring up a database replica.
- yawaramin 10y agoAt the kind of scale you're talking about, I am pretty confident that 90% of people just won't need to do anything on that scale. For most people, business logic in the DB will serve their needs perfectly. And if some day they need to scale up to some level beyond a single DB, I'm also pretty confident that they'll have the resources to spend on a DBA consultant specialising in sharding or replication :-)