Avoid SQL queries that no index can support for artifacts with high fan-in | CAST Appmarq

Avoid SQL queries that no index can support for artifacts with high fan-in


Rule Definition
SQL Queries that do not use table indexes are extremely dangerous for the application's performance. Indeed, each execution of the query will result in a full table scan which is extremely time consuming. When the artifacts have a high fan-in the risk is highly increased.

Remediation
Try to use indexed columns in WHERE and HAVING clauses. If it is not possible, then create a secondary index for these columns.

Related Technologies

Health Factor

  Efficiency


Technical Criterion
CWE-1067 - Excessive Execution of Sequential Searches of Data Resource

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.

Benchmark Statistics

Global Compliance

100.00%

Total Violations
0
Total Opportunities
20
Average Violations / App.
0.00
The compliance score represents 1 minus the ratio between the number of times a rule has been violated compared to the number of opportunities in a set of applications that the rule could have been violated.

Industry Insights

Select from drop-down

87.63%

Financial Services

64.81%

Software ISV

72.39%