Rule Definition
If the amount of data is large, nested loops are fully avoided due to performance issues. If the program is extracting small amount of data, then focus on SELECT statements than nested loops.
The indexed loop and READ statement using binary search are the best methods to avoid performance issues.
Remediation
Evaluate the amount of data processed in the loop and, if necessary, replace nested loop by indexed loop or READ statement with binary search.
Related Technologies
Technical Criterion
CWE-1049 - Excessive Data Query Operations in a Large Data Table
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.