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
Live.getCounters times out on very large instance #6758
Comments
+1 But this does not solve the problem for most of users (the don't want to disable unique visitors processing during archiving). |
I can confirm the problem is caused by |
just to confirm, this feature is not worth a new index. |
* If we know there are 0 visits, do not execute any further query. * Added showColumns as it is more appropriate
As The problem is, that the current If we only look at the last 3 minutes in that widget we could write a separate method that is faster for this use case maybe. I reckon in 3 minutes we're talking about max 150k visitors that we have to deal with? Currently, querying the unique visitors means it uses the index |
Edit: I just verified MYSQL will automatically choose the |
well done! |
On a very large Piwik instance, there are several performance challenges. One issue is that the Real time counter displayed on top of the Real time visitors widget times out on a very large DB.
Query is:
the problem likely is the COUNT(DISTINCT) which doesn't scale.
Possible solution: let user disable the counting of unique users via config file. For example we could reuse the existing
enable_processing_unique_visitors_day
and if it is se to0
then the Live API would not issueCOUNT(DISTINCT idvisitor
.The text was updated successfully, but these errors were encountered: