‘Checks executed after computation of measures’ step can take a lot of time for some users, between 11 and 18 seconds.
This issue is coming from the following SQL request.
In this context, the SQL request is not using the index "LIVE_MEASURES_COMPONENT" on "LIVE_MEASURES"("COMPONENT_UUID", "METRIC_UUID") is not used, which makes the query do a full scan of the "LIVE_MEASURES" table.
One solution would be to not use the "COMPONENTS" table to query projects, but to use the new "PROJECTS" table.
The new query would be :
(This query would only work starting 8.2 using new projects table introduced by
Implementation note: the suggested fix does improve the query performance in theory. Note that our tests on a 800Gb PostgreSQL database did not demonstrate a real-world improvement, as the PostgreSQL optimizer is using the index on live_measure in our case. We decided to merge this anyway, because it's theoretically better. Results will vary depending on the dataset structure & balance.