Question: You are comparing two ways to compute something expensive:
Example: if #1 finishes in 2 seconds and #2 finishes in .4 seconds but sends 1.6MB into GC each run, how do you decide whether that extra 1.6MB of GC pressure is worth it for the faster execution time?
Assume: this expensive calculating is happening 10-100 times/minute and the server has plenty of memory and cores to handle the load.
Assume: this expensive calculation is faster to compute with .NET than with TSQL. (Otherwise this is all moot)
- Computing on the SQL server and getting the answer via SqlClient
- SQL data brought into memory via SqlClient and the compute done in .NET code.
Example: if #1 finishes in 2 seconds and #2 finishes in .4 seconds but sends 1.6MB into GC each run, how do you decide whether that extra 1.6MB of GC pressure is worth it for the faster execution time?
Assume: this expensive calculating is happening 10-100 times/minute and the server has plenty of memory and cores to handle the load.
Assume: this expensive calculation is faster to compute with .NET than with TSQL. (Otherwise this is all moot)