When a SonarQube instance contains a lot of issues, deleting a project from the UI can be slow and requires a lot of CPU.
The CE DB purge step and the deletion of projects from UI trigger full scans of issue_changes. That leads to high pressure on DB and to the inability to process the Compute Engine queue.
A few options are:
- add the column issue_changes.project_uuid so that the purge SQL request can be filtered and stop full scanning the table.
- add a foreign key from issue_changes.issue_key to issues.kee so that the PostgreSQL feature "on delete cascade" can be implemented on issues.