@citosid opened this Issue on February 3rd 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 commented on February 3rd 2018 Member

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.

This Issue was closed on April 21st 2020
Powered by GitHub Issue Mirror