When generating a Pages report for a custom date range, most of the time in MYSQL is spent doing INSERT IGNORE INTO queries in MYSQL, so my question is, why are these queries needed?
The total time spent on the queries is 1.16 s, so a pretty large amount of the time spent by NSERT IGNORE INTO.
Hmm, maybe this is because of usage of archiving_range_force_on_browser_request, or? Then I guess it's like it should be...
Hi @mikkeschiren, thanks for contacting us. When generating a report for a custom date range for the first time there will not be a cached version of the report available, so Matomo will first generate the cached version of the report by inserting into in the archive_* tables before displaying it. Depend on the data this could be a little slow, but any subsequent requests for the same report should use the cached version.
archiving_range_force_on_browser_request
can be used to disable this behavior but it should be enabled if you want to use custom date ranges, since the cron archiver dpes not generate data for custom date ranges.