Skip to Content
0
Former Member
Apr 30, 2009 at 05:00 AM

Hints for ADABAS

202 Views

Hello!

I try to optimize select below by using HINTS. But i get the same execution plan as without hints.

SELECTION:

SELECT plaf~plnum
             plaf~plgrp
             mara~matnr
             makt~maktx
             plaf~gsmng
             plaf~meins
             kbko~gltrs
        FROM kbko join plaf on
          kbko~plnum = plaf~plnum
        join mara on
          plaf~matnr = mara~matnr
        join makt on
          mara~matnr = makt~matnr

        INTO TABLE gtab_data_year
        WHERE plaf~PLSCN = P_PLSCN
          AND plaf~plwrk = p_werks
          AND plaf~plgrp IN gt_plgrp_rn
          AND plaf~paart = gcon_paart
          AND plaf~obart = p_obart
          AND mara~mtart = gcon_mtart
          AND makt~spras = sy-langu
          AND kbko~gstrs IN gt_gstrs_rn
          AND kbko~typkz = gcon_typkz
          %_HINTS ADABAS  'INDEXACCESS ("PLAF~ZI2")'
           ADABAS 'ACCESS = "PLAF"'.

EXECUTION PLAN 1:

COLUMN OR INDEX                STRATEGY                                                                                
MARA~T                         EQUAL CONDITION FOR INDEX               
                                ONLY INDEX ACCESSED                     
 MANDT                               (USED INDEX COLUMN)                
 MTART                               (USED INDEX COLUMN)                
 MANDT                               (USED KEY COLUMN)                  
                                JOIN VIA MULTIPLE KEY COLUMNS           
 MANDT                               (USED KEY COLUMN)                  
 MATNR                               (USED KEY COLUMN)                  
 SPRAS                               (USED KEY COLUMN)                  
 PLAF~1                         JOIN VIA MULTIPLE INDEXED COLUMNS       
 MANDT                               (USED INDEX COLUMN)                
 MATNR                               (USED INDEX COLUMN)                
 PLWRK                               (USED INDEX COLUMN)                
 MANDT                          JOIN VIA KEY RANGE

Execution plan in other system without hints.

EXECUTION PLAN 2:

COLUMN OR INDEX                STRATEGY

PLAF~ZI2                       RANGE CONDITION FOR INDEX
MANDT                               (USED INDEX COLUMN)
PLSCN                               (USED INDEX COLUMN)
PLWRK                               (USED INDEX COLUMN)
PLGRP                               (USED INDEX COLUMN)
MANDT                               (USED KEY COLUMN)
                               JOIN VIA MULTIPLE KEY COLUMNS
MANDT                               (USED KEY COLUMN)
MATNR                               (USED KEY COLUMN)
                               JOIN VIA MULTIPLE KEY COLUMNS
MANDT                               (USED KEY COLUMN)
MATNR                               (USED KEY COLUMN)
SPRAS                               (USED KEY COLUMN)
MANDT                          JOIN VIA KEY RANGE

What hint for selection should i use to get PLAN 2?