CRITICAL
Rule Definition
COUNT(*) statement is time and ressource consuming and it can dramatically slow your application.
Remediation
Try to reduce the number of COUNT(*) in the programs.
Violation Code Sample
C/EXEC SQL
C+ select column1,column2,count(*) // Quality Rule Violation
C+ from sample_table;
C/END-EXEC
Fixed Code Sample
Remediation for Sample:
C/EXEC SQL
C+ select column1,column2,count(Primary_key_column)
C+ from sample_table;
C/END-EXEC
Related Technologies
Technical Criterion
Efficiency - SQL and Data Handling Performance
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.