Make archive invalidator query faster when there are 10-100K sites #18991
Labels
c: Performance
For when we could improve the performance / speed of Matomo.
Milestone
See https://forum.matomo.org/t/matomo-on-premise-scaling/45262
SELECT option_name, option_value FROM matomo_option WHERE option_name LIKE '%report\\_to\\_invalidate\\_%\\_%';
may take a few seconds when there are 10-100K sites.Created #18990 as a minor improvement but it won’t make it much faster.
The initial
%
in thelike
clause that makes the query maybe slower is still needed as we currently prefix a random unique id to the option name so it won’t cause locks. This could be maybe worked around or changed but it's unclear.It was added in https://github.com/matomo-org/matomo/pull/15666/files#diff-88e28f71aefcd536256f874d55fa5d6eb2783391010861ed67461ea6bbda4ef2R176 initially. See comment #15545 (comment) we weren’t even sure if it will work. This would need to be validated if it actually helps/works.
The text was updated successfully, but these errors were encountered: