3 ms·
One downside to doing these calculations in the application, vs the DB: You have to transfer more data from the DB over a finite sized connection than you do if
by falcolas 11y ago
One downside to doing these calculations in the application, vs the DB: You have to transfer more data from the DB over a finite sized connection than you do if it's in SQL (stored procs or no). For better or worse, the DB is well tuned for these forms of workflows, most general application programming languages are not.
This doesn't apply to data which is being manipulated before stored, of course.
- cjefferies 11y agoYes, absolutely. That is one downside to this approach (and there are more). Even though you are moving the data to the calculations, I would still contend that this approach can be as efficient, if not more efficient, depending on how well your app layer is scaled. However, this is the challenge of designing software, weighing the pros and cons and making the best decision based on your situation.