CRITICAL
Rule Definition
Using complex queries in Artifacts can cause performance issues.
Remediation
Modify the source code to reduce the number of Sections with queries on more than 4 tables.
Violation Code Sample
<?php
echo "select twentytwo_jan_local.student_impdetail.std_id,
twentytwo_jan_local.student_impdetail.std_name,
twentytwo_jan_local.student_impdetail.std_class,
twentytwo_jan_local.student_details.std_father_name,
twentytwo_jan_local.student_details.std_mother_name,
twentytwo_jan_local.student_details.std_age,
twentytwo_jan_local.student_contact.std_mail_id,
twentytwo_jan_local.student_contact.std_phone_no,
twentytwo_jan_local.student_LogIn.std_username,
twentytwo_jan_local.student_LogIn.std_password,
twentytwo_jan_local.student_report.std_result,
twentytwo_jan_local.student_report.std_remark
from twentytwo_jan_local.student_impdetail
inner join twentytwo_jan_local.student_details on twentytwo_jan_local.student_impdetail.std_id = twentytwo_jan_local.student_details.std_id
inner join twentytwo_jan_local.student_contact on twentytwo_jan_local.student_impdetail.std_id = twentytwo_jan_local.student_contact.std_id
inner join twentytwo_jan_local.student_LogIn on twentytwo_jan_local.student_impdetail.std_id = twentytwo_jan_local.student_LogIn.std_id
inner join twentytwo_jan_local.student_report on twentytwo_jan_local.student_impdetail.std_id = twentytwo_jan_local.student_report.std_id";
?>
---OR---
<?php
$query = "select student_impdetail.std_id,
student_impdetail.std_name,
student_impdetail.std_class,
student_details.std_father_name,
student_details.std_mother_name,
student_details.std_age,
student_contact.std_mail_id,
student_contact.std_phone_no,
student_LogIn.std_username,
student_LogIn.std_password,
student_report.std_result,
student_report.std_remark
from twentyone_feb_one_local.student_impdetail as student_impdetail,
twentyone_feb_one_local.student_details as student_details,
twentyone_feb_one_local.student_contact as student_contact,
twentyone_feb_one_local.student_LogIn as student_LogIn,
twentyone_feb_one_local.student_report as student_report
";
<?php
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.