[X] Before you openning this issue, i have checked if the issue has already been reported.
Bagisto Version(s) affected
1.4.5
Issue Description
The main Admin Dashboard, within DashboardController@Index creates way too many queries to sum the total sales for each day.
It creates 3x queries per day selected, so if you view 90 days you are getting way too many queries -- these can be grouped together in mysql and then looped over to build the array
What is the best way for me to optimize this query without losing my changes with future Bagisto Updates?
Do I need to override the whole controller? I see a page in the docs about creating new packages, but I dont see much advices about optimizing the DB queries themselves
Terms
Bagisto Version(s) affected
1.4.5
Issue Description
The main Admin Dashboard, within DashboardController@Index creates way too many queries to sum the total sales for each day.
It creates 3x queries per day selected, so if you view 90 days you are getting way too many queries -- these can be grouped together in mysql and then looped over to build the array
What is the best way for me to optimize this query without losing my changes with future Bagisto Updates?
Do I need to override the whole controller? I see a page in the docs about creating new packages, but I dont see much advices about optimizing the DB queries themselves
Preconditions
fresh install
Steps to reproduce
Expected Result
less queries
Actual Result
too many
Screenshots
No response
Additional context
No response