Query Plan for My Accounts View (Different ORDER BY Clause)

The second SQL statement generated in My Accounts (see the following example) has a different ORDER BY clause. Even though the columns NAME and LOC of S_ORG_EXT are indexed, the database cannot use this index. Performance decreases from the use of a temporary table. The same behavior occurs if the ORDER BY clause uses the columns X_NAME and X_LOC instead of NAME and LOC.

The following example shows a different ORDER BY clause than the previous example query plan.

WHERE
   ((T2.INT_ORG_FLG != 'Y' OR T2.PRTNR_FLG != 'N') AND)
   T3.ACCNT_NAME >= ?))
ORDER BY
   T3.ACCNT_NAME, T3.POSITION_ID 
Query plan : TEMPORARY TABLE 
T3(S_ACCNT_POSTN_M1),T2(S_ORG_EXT_P1),T1(S_PARTY_P1),T15(S_POSTN_U2),T10(S_POSTN_
U2),T4(S_PARTY_P1),T12(S_ADDR_ORG_P1),T13(S_INDUST_P1),T7(S_ORG_EXT_U3),T16(S_
USER_U2),T11(S_USER_U2),T17(S_ORG_SYN_P1),T6(S_INVLOC_P1),T5(S_PRI_LST_P1),T14(S_
ASGN_GRP_P1),T18(S_ORG_BU_U1),T19(S_PARTY_P1),T20(S_ORG_EXT_U3),T8(S_ORG_EXT_SS_
U1),T9(se)