Displaying 1 result from an estimated 1 matches for "categorywise".
Did you mean:
categorise
2006 Aug 09
0
Sum/Aggregate at database level or in rails controller?
...tasks.id
group by categories.name
similarly I will have write queries for getting category wise data for
every day of 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 relat...