Slow analysis parsing - How to run "VACUUM" equivalent on Azure SQL Server

Hi guys, I have the following logs:

[o.s.c.t.p.s.ExecuteVisitorsStep]   Execution time for each component visitor:
[o.s.c.t.p.s.ExecuteVisitorsStep]   - AnalysisFromSonarQube94Visitor | time=0ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - LoadComponentUuidsHavingOpenIssuesVisitor | time=8ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - IntegrateIssuesVisitor | time=2060495ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - CloseIssuesOnRemovedComponentsVisitor | time=0ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - MaintainabilityMeasuresVisitor | time=3ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - NewMaintainabilityMeasuresVisitor | time=0ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - ReliabilityAndSecurityRatingMeasuresVisitor | time=2ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - NewReliabilityAndSecurityRatingMeasuresVisitor | time=0ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - SecurityReviewMeasuresVisitor | time=1ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - NewSecurityReviewMeasuresVisitor | time=3ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - LastCommitVisitor | time=10ms
[o.s.c.t.p.s.ExecuteVisitorsStep]   - MeasureComputersVisitor | time=2ms
[o.s.c.t.s.ComputationStepExecutor] Execute component visitors | status=SUCCESS | time=2060530ms

The server took about 35mins+ in parsing/publishing the code analysis.
The server has a lot of projects and most of the time it takes 30-40 mins to process the analysis.

If I try to publish the analysis of my project on a separate isolated local server, it will only take less than 2 mins so I think it there is something wrong with the server.

Server version now is 9.9 --it has been upgraded a couple of times since last year (the starting version was v9.x)

I have read a few discussions that it might be a database issue and that I would need to run “VACUUM” queries after an upgrade but that seems to be for PortressSQL, my database is an Azure SQL Server.

How do I perform those operations --“refresh the database’s statistics and rebuild the database’s indices” for Azure SQL Server?


Hey there.

You can UPDATE STATISTICS and reindex your database. It’s best if you can consult with a DBA in your organization.