Performance: Faster algorithm to count unique visitors #3120
Labels
c: Performance
For when we could improve the performance / speed of Matomo.
Task
Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone
Suggested in forum post
Currently we count the number of distinct idvisitor, to get unique per week/month/etc.
Instead, we could count each time a visitor is new (he didn't have the idcookie or wasn't match to recent visit), set a flag. Then count the number of times the flag was set. This will be slightly more inaccurate but much faster than running a new SELECT count(disctinct) on very large datasets.
The text was updated successfully, but these errors were encountered: