Optimize N+1 query for reset_remediations, update_feedbacks, and update_finding_signatures in StoreReportService
In StoreReportService, we have an opportunity to optimize N+1 queries for different places. We need to investigate the following location to figure out whether we can eliminate N+1 queries:
- find_existing_remediations_for
- update_feedbacks
- update_finding_signatures: We can investigate whether it is possible to update finding signature for the whole report in a single bulk_insert
We have done similar work in the following MRs:
We are going to drop the feature-flag optimize_sql_query_for_security_report. Please use a new feature flag for this work if needed. Thanks.
Edited by Saikat Sarkar