Use of commands such as UNION or JOIN, which can affect performance
Summary:
Hello Experts,
We are using below Custom Criteria for our Security Profile, and we are facing below error due this
Your custom criteria contain the UNION operation, which isn't recommended as it can negatively affect runtime performance. (PER-1532193)
The custom criteria sql is below:
EXISTS ((SELECT 1 from PER_ALL_ASSIGNMENTS_M ****, PER_PERSONS P WHERE P.PERSON_ID = ****.PERSON_ID(+) AND TRUNC(SYSDATE) BETWEEN LEAST(TRUNC(SYSDATE),****.EFFECTIVE_START_DATE(+)) AND ****.EFFECTIVE_END_DATE(+) AND ****.EFFECTIVE_LATEST_CHANGE(+)='Y' AND ****.ASSIGNMENT_TYPE IN ('E','C','N','P') AND P.PERSON_ID=&TABLE_ALIAS.PERSON_ID AND ( P.PERSON_ID <> (SELECT NVL(HRC_SESSION_UTIL.GET_USER_PERSONID,-1) FROM DUAL) AND (( ****.ASSIGNMENT_ID IS NULL AND EXISTS (SELECT 1 FROM PER_PERSON_TYPE_USAGES_M PTU WHERE PTU.PERSON_ID=P.PERSON_ID AND ( (PTU.SYSTEM_PERSON_TYPE IN ('BENNONWRKR','BNF','CON','DPNT','ORA_CANDIDATE','PENSIONER') OR PTU.PERSON_TYPE_ID IN (300000000349581))))) OR ( ****.ASSIGNMENT_ID IS NOT NULL AND ( ((****.SYSTEM_PERSON_TYPE IN ('CWK','EMP','NONW','PWK','