Performance Related Clarification Required

Hi Everybody,
I have a doubt regarding usage of JOINS, do JOINS (...both inner and outer join) increase the performance or decrease the performance. If it increase, WHY??? If it decrease, WHY???

Consider the following code snippet,
FIND FIRST org NO-ERROR.
IF AVAILABLE org then
DO:
FOR EACH orgsearch NO-LOCK WHERE orgsearch.custOrgID = org.orgId:
FOR EACH profileOrg NO-LOCK WHERE profileOrg.OrgId = orgSearch.orgId:
RUN pCreateTempProfile (INPUT profileOrg.userProfileId, INPUT "PROFILEORG").
END. /* FOR EACH profileOrg */
END. /* FOR EACH orgsearch */
END. /* IF AVAILABLE org */


All the above tables are having atleast 30 lakhs of record. The above code snippet can also be written using JOINS. So is it that writing the same using JOINS will increase the performance?


Let me know if more information is required. Thanks in advance.
 
Back
Top