-
Notifications
You must be signed in to change notification settings - Fork 240
Top Counter with acl really slow #5974
Comments
Hi, After testing the queries, the first is faster compared to the second. First request :
Second request :
I think we should review the indexes of this table, so that everyone is at the same level. Regards |
Index have changed in 2.8.x... I'm not sure that all acl requests have changed. The index is better (you can remove the index on host_id/group_id). But in the upgrade, it seems we didn't remove the host_id/group_id... So could you test following request ?
|
Hi, You put 'AND' too much in your request, at the end.
So I modified it, here is the result:
Here is the list of files using 'centreon_acl': Here is the list of Indexes, which I have after updates since the last version 2.6: Here is the construction of the table, createTablesCentstorage.sql file:
Here are the changes in the update, file 'Update-CSTG-2.8.0-beta2_to_2.8.0.sql':
|
Could you give me the explain ? |
|
I have looked. And EXISTS is far better with large result sets. But the problem is the index. EXISTS is better if we filter directly with the top counter. So we need to add the other index:
And try following requests:
|
Yes, it works better. But it takes even longer than the current request:
Comparison, (Even after several launch):
|
EXISTS is slower on small sets (than IN). But it's ok (it's quite the same). but it's very faster on large sets. |
Small sets ? On which scale (above 50000) ?
|
It's not large :) |
Ok, but it should not be penalized for the smallest infrastructure. |
When i look, you have: 0.21s and 0.16s. |
Everything depends on the group in which you belong:
|
I think it's acceptable. In some other case, i can be 25s more. |
it's not huge as a difference but it all depends on how many people connect to it on the WEB interface. The 25 seconds are not linked to the indexes? |
That's 25 seconds because of the IN. |
Ok, good end of the year ;) |
* fix(sql): add index in centreon_acl for topcounter Refs: #5974 * enh(update): add acl index on updgrade
* fix(sql): add index in centreon_acl for topcounter Refs: #5974 * enh(update): add acl index on updgrade
The top counter values are correct since upgrade from 2.8.9 to 2.8.18 but cannot notice better response times for statuscounter queries. |
BUG REPORT INFORMATION
Centreon Web version: 2.8.16
Steps to reproduce the issue:
Describe the results you received:
The request for top counter is slow with acl
Describe the results you expected:
Need to replace:
By:
Additional information you think important (e.g. issue happens only occasionally):
Better result with a good query:
The text was updated successfully, but these errors were encountered: