SonarQub mysql slow query

Hi Team,

We are using SonarQube 6.7.6 (LTS).
we use web api to apply template to my project , there is mysql slow query as follows

SELECT u.login FROM(
SELECT DISTINCT u.login AS login, u.name AS name
FROM users u
LEFT JOIN perm_templates_users ptu ON ptu.user_id=u.id AND ptu.template_id=xxxx
INNER JOIN organization_members om ON u.id=om.user_id AND om.organization_uuid=‘xxxxx’
WHERE u.active = true
and ptu.permission_reference is not null
and ptu.permission_reference=‘xxxx’
) u
ORDER BY u.name;

Can you please help us to understand how it can be done ?
Thanks,
lili

Hi,

Welcome to the community!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

6.7.6 → 7.9.6 → 8.9.3 → 9.1 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.