re: You Can Do it in SQL, Stop Writing Extra Code for it VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Some things to keep in mind. Depending on the SQL logic, this could add additional CPU resource pressure on the database server, a service that i...
 

You'll always want to keep in mind how your application is deployed and where you have the most resources.

One application I worked on was deployed on a provider with a pricing model where you paid for web server instances but the database itself was bundled in as part of the package. This lead to a design that off-loaded as much as possible onto the database as it was basically "free" compute. The database instance was far, far faster than any of the individual web servers.

In modern configurations you're going to have a lot of web instances and a few databases that you want to keep lightly loaded so they're responsive. This is especially true if leaning hard on your database means buying more ultra-expensive database server licenses.

 

It is a balance of trade-offs as it is usually in distributed systems. Choosing the right trade-off is one of the keys to success in our field.

code of conduct - report abuse