The performance here is going to be all in the database engine you’ve connected to SonarQube. What database engine are you using (Postgres, Oracle, SQL Server…) and have you checked how your database is performing? Is it under load while these requests are being made?