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

Execute segment query only once to improve performance #8354

Closed
quba opened this issue Jul 15, 2015 · 2 comments
Closed

Execute segment query only once to improve performance #8354

quba opened this issue Jul 15, 2015 · 2 comments
Labels
c: Performance For when we could improve the performance / speed of Matomo. duplicate For issues that already existed in our issue tracker and were reported previously.
Milestone

Comments

@quba
Copy link
Contributor

quba commented Jul 15, 2015

Background

When we have a segment like segment=pageUrl=@subdomain.domain.com/en, Piwik executes a subquery to filter the data set. This query uses condition where name like %subdomain.domain.com/en%.

Problem

Everything works OK but the case is that Piwik executes the same query for each archiver query. In ideal case Piwik would query the action IDs only once and then cache it.

Performance use case

I think that this improvement would greatly improve Piwik performance, mostly for users who are using segments processed in realtime.

@mattab mattab added the c: Performance For when we could improve the performance / speed of Matomo. label Jul 15, 2015
@mattab mattab added this to the Mid term milestone Jul 15, 2015
@mattab
Copy link
Member

mattab commented Jul 15, 2015

Thanks @quba for suggestion!

Ideally we would have exact data to backup our feeling it would speed things up, ie. what is % time spent in sub-query VS the whole archiver query. If we cache the result of subquery, we know we'd save this % in each subsequent archiver query. Waiting for more data to know whether it's worth it before we schedule the issue

@mattab
Copy link
Member

mattab commented Sep 28, 2015

see Cache segment subqueries using LIKE constraint #8850

@mattab mattab closed this as completed Sep 28, 2015
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Sep 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo. duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

2 participants