Avoid SOQL inside loops
Impact area
Performance
Severity
High
Affected element
Apex Class
Rule ID
SF-0016
Impact
Multiple object creation inside a loop can cause memory issues.
Remediation
New objects created within loops should be checked to see if they can be created outside them and reused.
Time to fix
60 min