Displaying 1 result from an estimated 1 matches for "aggragt".
Did you mean:
aggrgt
2006 Aug 09
0
Sum/Aggregate at database level or in rails controller?
...f the week. and many more such queries.
2. Fire a single query which gets all the data for a specific user and then
write some logic in controller to aggregate data daily/weekly/categorywise
from the result set of one single query.
3. Write some stored procedures at database level which will return
aggragted data.
What I experienced is that with approach 1 overall code gets simpler, but
the number of SQL queries increases drastically and which may later on pose
some performance related issues as for every request I would need to run the
above queries.
In second approach I have to write a lot of cod...