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
removed order by idsite for Model #9684
removed order by idsite for Model #9684
Conversation
It prevented display of visits to be ordered by most important dimension - Time when MetaSites plugin was enabled.
Can we wait with this one for 2.16.1 maybe? Not sure if we might introduce any performance regressions and should maybe beta test first. FYI: We talked about |
I've checked this query with |
We should maybe run it with various database sizes. Did you check it with a big instance having many sites, many requests etc? |
Might be still good as it's actually in the where clause. |
Yes, it is still in the |
the algorithms change very much based on the dataset, ie. mysql will choose to use an INDEX or not depending on metrics processed in real time (and pre-aggregated statistics stored in the table statistics eg. cardinality of keys) by the mysql optimiser... |
@mattab @tsteur We have tested queries on large database 17GB (41717299 rows total) And query without Here are
EXPLAIN:
With idsite:
EXPLAIN:
So I guess it will have impact only on reaaaaally big clients and it will be a positive one :) |
17GB is not really a large database :) can you also try what happens when there are many sites given in the |
When you did performance tests, did you clear the MySQL caches between the tests? |
Yes, the cache was cleared, beside test without |
Idea in order to have it in 2.16.0 is following: When only one idSite is given, still leave the idSite in the order by clause. When multiple sites are given, remove the idSite. This way we make sure not to regress anything for most users. Do you know what I mean? |
Let me know if you can't do it now and I will issue the PR |
See #9694 We will try to merge this one in 3.0 or 2.16.X |
17GB this was the size of |
@mattab do you have any thoughts on this? The index for If we do not merge this and keep the idsite in there, we could actually improve the performance of this query in most cases by using |
If w do not merge this we should really create a follow up issue to improve the performance of that query as mentioned. If we merge this PR it needs a rebase |
Hi @sebastianpiskorski |
@matt let's maybe create an issue to speed the query up #9684 (comment) Will create an issue for it next week |
It prevented display of visits to be ordered by most important dimension - Time when MetaSites plugin was enabled.