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

razor - Is this a bug in WebMatrix PageData? -

iphone - Requiring the presence of a method in an id -

xslt - Is it possible to select a node that just includes a subset of the child nodes? -