The SQL generated by the statement "lObj.getChildObjs
()" unneccessarily does a table join between the parent
table and the child table. When retrieving all child
records related to the parent the foreign key in the child
can be checked directly against the parent instance id.
This will improve processing time considerably.
Example: Parent table = e_erroneous_message, chuild
table = e_error.
Old SQL:
SELECT DISTINCT
rq.recordid,rq.a_error_type,rq.a_table_name,rq.a_failure_t
imestamp,rq.a_publish_timestamp,rq.a_extra_informatio
n,rq.r_error_type_config,rq.r_erroneous_message
FROM e_error rq,e_erroneous_message ru
WHERE (( ru.recordid = ? AND ru.recordid =
rq.r_erroneous_message ));
Better SQL:
SELECT
rq.recordid,rq.a_error_type,rq.a_table_name,rq.a_failure_t
imestamp,rq.a_publish_timestamp,rq.a_extra_informatio
n,rq.r_error_type_config,rq.r_erroneous_message
FROM e_error rq
WHERE (rq.r_erroneous_message = ?);
(NOte distinct is not needed either (I think this is
another RFE)).