sql server - Which is faster? Multiplication in code, or multiplication in SQL? -


question:

what's faster: multiplying 2 doubles in sql table , return table, or returning table , multiplying 2 column values in code ?

you can assume 2 columns need multiplied need returned anyway.

multiplication extremely fast computation, , whether chip asked sql or places shouldnt make differnce. thing make quicker in sql can done in single pass (though depends on how sql implements it), if in code have cycle through result set, again might doing anyway.

the real answer though doesnt matter unless plan multiply 10's of millions of numbers @ time.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -