Improve events and contents archiver performance when used with segments #12949
Labels
c: Performance
For when we could improve the performance / speed of Matomo.
worksforme
The issue cannot be reproduced and things work as intended.
We could improve the performance of events, and likely other reports massively by changing the archiving queries. For example the below query could be improved to the 2nd version which on a big data set here improves the query time from
117
seconds to6
seconds. This is because the join only needs to be evaluated for a limited result set whereas before it was needed to join the tables basically for all actions (including pageviews etc). I presume this will be always a big boost eg if there are many page views but only a few events. For the actions archiver it would be beneficial when there are many events but only a few page views for example. The same should be done for contents archiving.The pattern is basically to first evaluate all events without having to join anything, then join the tables on the limited result set.
Please note that it makes the query about 0.3s slower for when not a segment is applied (on the tested big data set) from 4.2seconds to 4.5 seconds.
Current version:
Improved version:
The text was updated successfully, but these errors were encountered: