@mattab opened this issue on December 14th 2012
Currently, archiving a month in Piwik will sum the reports for all 30 days and sum all reports together. This is causing most of the php memory issues which start failing when summing all datatables for Pages URLs for a month for example. Instead, we should reuse the algorithm used to process date ranges, which select the minimum number of periods to use to process the enclosing period. So, a month would typically use 3 or 4 full weeks + the remaining ~5-10 days. This would result in up to 70% less datatables to select and sum! 

ie a month archiving would select 4 weeks archiving + 3 day archiving, or 3 weeks archiving + 10 days archiving, so either 7 or 13 archives, instead of 30...

See also related bug #4757

@mattab commented on December 15th 2013

Perhaps this was fixed in your earlier fix to this algorithm?

@mattab commented on February 26th 2014

See also related bug #4757

@mattab commented on March 16th 2014

We decided, after investigating for a few hours, that It is non trivial to make the change. Let's postpone for now.

@mattab commented on March 18th 2015

would be nice to try again for 2.13.0 as it would make huge UI speed improvement difference for all date range requests

This issue was closed on March 31st 2015
Powered by GitHub Issue Mirror