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

Is it maybe possible to optimize count(distinct) SQL queries? #10188

Closed
mattab opened this issue May 28, 2016 · 3 comments
Closed

Is it maybe possible to optimize count(distinct) SQL queries? #10188

mattab opened this issue May 28, 2016 · 3 comments
Labels
c: Performance For when we could improve the performance / speed of Matomo. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@mattab
Copy link
Member

mattab commented May 28, 2016

As I was reading this very interesting article: https://www.periscopedata.com/blog/use-subqueries-to-count-distinct-50x-faster.html I am wondering whether these findings could be applied to our SQL queries in Piwik?

We have had performance issues with processing COUNT( DISTINCT field ) on our very large datasets... maybe there is actually a possibility to improve archiving performance. Help is most welcome!

@mattab mattab added the c: Performance For when we could improve the performance / speed of Matomo. label May 28, 2016
@mattab mattab added this to the 2.16.x (LTS) milestone May 28, 2016
@tsteur
Copy link
Member

tsteur commented May 30, 2016

I'm pretty sure I tried this when I had a look at this last time but definitely worth having a look again at some point

@mattab mattab modified the milestones: 3.0.0, 2.16.x (LTS) Jul 7, 2016
@andristeiner
Copy link

Today, i stumbled upon this as well while debugging slow reports when using custom date ranges. I was able to identify the count(distinct) queries as the culprit, then found this article: https://www.sisense.com/blog/use-subqueries-to-count-distinct-50x-faster/, and finally this existing ticket.

Let me know when we can assist you with some testing.

@mattab
Copy link
Member Author

mattab commented Dec 10, 2023

The team would re-create issue later if needed

@mattab mattab closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
@sgiehl sgiehl added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

4 participants