matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.88k stars 2.65k forks source link

New setting to disable processing of unique visitors for segments #9832

Open mattab opened 8 years ago

mattab commented 8 years ago

Problem

When a Piwik has thousands of segments created, a clear bottleneck is that processing unique visitors and unique users for a period such as week, month, year is very slow. The query to process unique visitors over a week often lasts more than 20 minutes. This is problematic when there are thousands such queries running every day.

Proposal

As a solution, we could add a new setting enable_processing_unique_visitors_segments which, when set to 0, would disable unique visitors processing for segments.

We may also want to create more specific settings to disable processing of unique for segments, for a particular period:

enable_processing_unique_visitors_segments_day
enable_processing_unique_visitors_segments_week
enable_processing_unique_visitors_segments_month
enable_processing_unique_visitors_segments_year
tsteur commented 8 years ago

Please let's either add enable_processing_unique_visitors_segments or the others but not both. There's already enough complexity added through all those config settings so we don't have to make it even more complex and harder to understand.