Task execution extremely slow after postgres upgrade

Hello guys,

We’re on Sonarqube v7.3 (build 15553), running on AWS backed by Postgres db, over the weekend we upgraded the db engine to v13.3, and noticed the task execution became extremely slow, it used to take ~5 seconds, now it took ~35 minutes :frowning:

We’ve followed the suggestion from this post SonarQube becomes slow after PostgreSQL upgrade and did a vacuum full analyze, I can see it reduced the db size by half. However the task execution time hardly change, well, it drops from ~35 to ~32 minutes.

Looking thru the logs, I noticed the following entries taking the longest time, but not sure what they are:

Persist components | time=993311ms
Build tree of components | components=45 | time=1005998ms

Any suggestion would be welcomed.


Thanks @Alexander_Dragun for the Slow analysis of Code after upgrade - #9 by Alexander_Dragun, I increased the work_mem the analysis time now drops back to normal.

1 Like


Welcome to the community!

I’m glad you found the answer to your problem. But I need to point out that 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:

7.3 → 7.9.6 → 8.9.2 → 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.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.