Skip to content

Real time map and Visitor Log may be slow on a very large traffic site #12722

@mattab

Description

@mattab

On a site with 100,000 pageviews and 1M events per day, the Real time map is very slow to load. The slow SQL query is:

SELECT sub.* FROM ( 
 SELECT log_visit.* 
 FROM log_visit AS log_visit 
 WHERE log_visit.idsite in ('28') 
      AND log_visit.visit_last_action_time > '1969-12-31 23:59:59' AND log_visit.visit_last_action_time >= '2018-03-14 08:05:48' 
 ORDER BY idsite DESC, visit_last_action_time DESC 
 LIMIT 0, 100 ) 
AS sub 
GROUP BY sub.idvisit 
ORDER BY sub.visit_last_action_time DESC LIMIT 100

It would be great if we could find a way to make the Real time map load faster.

The exact same query is triggered from the Visitor Log for the same day/website.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: PerformanceFor when we could improve the performance / speed of Matomo.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions