cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Performance impacts: into corresponding / EQ vs. LIKE

Former Member
0 Kudos

Hi,

can you please help me to optimize this SQL Select?

   VBUP                                                      RANGE CONDITION FOR KEY                    9628

MANDT                           (USED KEY COLUMN)
   LIPS                                                      JOIN VIA MULTIPLE KEY COLUMNS            108665

MANDT                           (USED KEY COLUMN)

VBELN                           (USED KEY COLUMN)

POSNR                           (USED KEY COLUMN)
   MAKT                                                     JOIN VIA MULTIPLE KEY COLUMNS               443

MANDT                           (USED KEY COLUMN)

MATNR                           (USED KEY COLUMN)

SPRAS                           (USED KEY COLUMN)
   LIKP                                                      JOIN VIA MULTIPLE KEY COLUMNS              1252

TABLE HASHED

MANDT                           (USED KEY COLUMN)

VBELN                           (USED KEY COLUMN)
   VBAK                                                      JOIN VIA MULTIPLE KEY COLUMNS               763

TABLE HASHED

MANDT                           (USED KEY COLUMN)

VBELN                           (USED KEY COLUMN)
   VBAP                                                      JOIN VIA MULTIPLE KEY COLUMNS              4049

MANDT                           (USED KEY COLUMN)

VBELN                           (USED KEY COLUMN)

POSNR                           (USED KEY COLUMN)

NO TEMPORARY RESULTS CREATED
   SHOW                                                           RESULT IS COPIED   , COSTVALUE IS   231704

Isn't it conspicuous that SHOW has the biggest value? May the INTO CORRESPONDING FIELDS OF TABLE be be the reason performance problem?

And are indices used for WHERE clauses only when I use EQ or also when I use LIKE?

Best Regards,

waldo

Accepted Solutions (1)

Accepted Solutions (1)

former_member184455
Active Participant
0 Kudos

Hi Waldemar,

the INTO CORRESPONDING FIELDS has no impact on performance when accessing non-buffered tables. For the LIKE it depends on what is the parameter for the LIKEd field an whether there are additional index fields following the LIKE-clause in the WHERE-condition.

In the Explain abaove it looks like the database only took the client field (MANDT) for accessing the table VBUP (and not VBELV and POSNR, though given), which could explain slow execution.

The ABAP vesion of the SQL-statement would be helpful.

Best Regards, Randolf

Answers (0)