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

Queries slow in Piwik 3.0.3 #12533

Closed
citosid opened this issue Feb 3, 2018 · 1 comment
Closed

Queries slow in Piwik 3.0.3 #12533

citosid opened this issue Feb 3, 2018 · 1 comment
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@citosid
Copy link

citosid commented Feb 3, 2018

We are currently trying to improve the way we handle our application logs. But we found a problem with the database. Apparently the system does not add indexes to the tables, which makes the queries super slow.

As an example, we wanted to get all the access of the last few months. In the UI it was simple impossible, however, in the DB directly was doable. But it was still too slow.

We added indexes to:

  • log_action.hash
  • log_action.url_prefix
  • log_link_visit_action.idaction_url
  • log_link_visit_action.server_time
  • log_visit.user_id
  • log_visit.idvisitor
  • log_visit.visit_last_action_time

These increased the speed a ton! Now we are able to make more searches directly in the UI (which was a side effect, since we were accessing the DB directly).

However, the question is: is this because of the version we have or this is a known issue?

@tsteur
Copy link
Member

tsteur commented Feb 3, 2018

By the sounds you have cron archiving disabled and instead browser archiving enabled? https://matomo.org/docs/setup-auto-archiving/

Likely those indexes are not really needed and make your tracking slower and increases DB size. With cron archiving you likely don't have this problem.

@mattab mattab closed this as completed Apr 21, 2020
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Apr 21, 2020
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

3 participants