java - Is it bad (performance) to get the sum from a database query instead of adding the results on Android? -


i have sqlite database in android app stores basic transaction info (date, amount, category, comments). know can query of transactions of specific category between 2 dates enough, want add cost (stored real in sqlite) each transaction of particular category between 2 dates. know there sum function in sqlite (thanks this question), last answer in this other question makes me question performance cost of doing so.

to understanding, sqlite written in native code, win mobile, performance key. i've been told less in java , let sqlite best in native code (and native code mean c / c++).

so in case of android, better cursor costs , loop through total (in java code), or better leave lifting sqlite? i'm not sure sqlite optimized on android.

thanks!

in general, should rely on database. otherwise, we'd of our data select * table , manipulations ourselves.

you're taking account unpopular answer compared accepted one. check out this question, instance. , last answer of this one.

but believe mother question.


Comments