Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When doing a custom range report there is a lot of INSERT IGNORE INTO mysql queries #18677

Closed
mikkeschiren opened this issue Jan 23, 2022 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@mikkeschiren
Copy link
Contributor

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?

bild

The total time spent on the queries is 1.16 s, so a pretty large amount of the time spent by NSERT IGNORE INTO.

@mikkeschiren mikkeschiren added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Jan 23, 2022
@mikkeschiren
Copy link
Contributor Author

Hmm, maybe this is because of usage of archiving_range_force_on_browser_request, or? Then I guess it's like it should be...

@bx80 bx80 added answered For when a question was asked and we referred to forum or answered it. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Jan 23, 2022
@bx80
Copy link
Contributor

bx80 commented Jan 23, 2022

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.

@bx80 bx80 closed this as completed Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants