which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): 9.7.1
how is SonarQube deployed: zip
Hi. After upgrading from 8.9.7LTS to 9.7.1 faced a problem: creating of projects takes 5-10min (before upgrade its take 5-10sec).
After some research found then all time spends for SELECT request in components table (37mill rows)
2023-05-10 16:58:39.218 > LOG: duration: 138485.207 ms execute <unnamed>: SELECT
p.uuid as uuid,
p.uuid_path as uuidPath,
p.branch_uuid as branchUuid,
p.module_uuid as moduleUuid,
p.module_uuid_path as moduleUuidPath,
p.main_branch_project_uuid as mainBranchProjectUuid,
p.kee as kee,
p.name as name,
p.long_name as longName,
p.description as description,
p.qualifier as qualifier,
p.scope as scope,
p.language as language,
p.root_uuid as rootUuid,
p.path as path,
p.enabled as enabled,
p.copy_component_uuid as copyComponentUuid,
p.private as isPrivate,
p.created_at as createdAt
FROM components p
where
lower(p.kee)=lower($1)
< 2023-05-10 16:58:39.218 > DETAIL: parameters: $1 = 'test_mdo'
Thanks for this report. Unfortunately, 9.7.1 is already EOL. Could you upgrade to a supported version: 9.9.1 LTS or 10.0, and see if this is replicable?
Hi.
We are using SonarQube 10.0. There are more than 20,000 projects.
It takes 8-18 sec to create a project via api.
POST api/projects/create?name=projectName&project=project
It seems that it takes less time when project is created manually, via web: https://sonarqube.***/projects/create?mode=manual
Is there any way to reduce the creating time via api?
I know your question seems related, but since a lot happened between 9.7 and 10.0, can you create a new thread, please? Include your DB flavor and any relevant-seeming server logs.
Hello @Deadstar2011 thanks a lot for the extra details, we were able to reproduce your issue and track it down to the use of the lower function in the query you posted.