Skip to content
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

UserID and Piwik performance #6351

Closed
quba opened this issue Sep 30, 2014 · 1 comment
Closed

UserID and Piwik performance #6351

quba opened this issue Sep 30, 2014 · 1 comment
Labels
worksforme The issue cannot be reproduced and things work as intended.

Comments

@quba
Copy link
Contributor

quba commented Sep 30, 2014

Users calculated using UserID feature are currently calculated same as unique visitors in Piwik. That means, that the same setting is applied as for unique visitors (also period to calculate). Piwik user that does not use UserID feature and wants to have unique visitors yearly report, has to execute very heavy SQL query for the year period even though he only wants to calculate unique visitors (distinct idvisitor and distinct user_id).

Proposed solution:

  1. Allow to set unique users (based on UserID) processing same as for unique visitors (day, week, month or even a year).
  2. Disable unique users processing by default and allow to enable it in config.

Why is it important?
I think that the goal is improve Piwik's performance when default configuration is used. This feature may cause performance issues for users that are processing yearly unique visitors even though they are not using UserID feature.

@mattab
Copy link
Member

mattab commented Sep 30, 2014

That means, that the same setting is applied as for unique visitors (also period to calculate).

Yes

Piwik user that does not use UserID feature and wants to have unique visitors yearly report, has to execute very heavy SQL query for the year period even though he only wants to calculate unique visitors

Actually nb_users and nb_uniq_visitors are processed in the same SQL query so there is no real performance hit of processing nb_users. Closing as worksforme but let me know if im missing something

Reference code: https://github.com/piwik/piwik/blob/master/core/ArchiveProcessor.php#L395-396

@mattab mattab closed this as completed Sep 30, 2014
@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Sep 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants