CRITICAL
Rule Definition
This diag will help to identify the violations around independent "exists" clause
- solve a potential performance and disk space issue
- applicable for all sql, including embeded sql
Remediation
select name from person
where exists (select 1 from children where children.fatherid = person.id)
Violation Code Sample
select name from person where exists (select 1 from children)
Fixed Code Sample
In the violation example, select will return all persons. The remediation will return persons who are parent.
I can only imagine such a case when query uses configuration option
select name from person where exists (select 1 from system_info where debug = 1)
Related Technologies
PL/SQL
Microsoft T-SQL
Sybase T-SQL
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.