Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Execution Hints

Former Member
0 Kudos

Hi everyone,

I used hints in my SQL statement but when I run it and check in ST05, the hints do not seemed to work because there is no PX in the execution plan.

Here is my code:


  SELECT mkpf~mandt
         mkpf~mblnr
         mkpf~mjahr
         mseg~zeile
         mkpf~budat
         mseg~bwart
         mseg~matnr
         mseg~werks
         mseg~lgort
         mseg~shkzg
         mseg~bwtar
         mseg~menge
         mseg~meins
         mseg~smbln
         mseg~kostl
         mseg~aufnr
         mseg~bukrs
         mseg~prctr
    FROM mkpf
   INNER JOIN mseg
      ON mseg~mandt EQ mkpf~mandt
     AND mseg~mblnr EQ mkpf~mblnr
     AND mseg~mjahr EQ mkpf~mjahr
    INTO TABLE ts_mseg1
   WHERE mkpf~budat IN s_budatf
     AND mseg~werks IN s_werks
    %_HINTS
    ORACLE 'PARALLEL(MKPF,5)'.

Hope you can help me on this. Thanks!

1 ACCEPTED SOLUTION

former_member192616
Active Contributor
0 Kudos

Hi,

parallel query can only be used with multiblock operations or partitions.

In your case you"ll still see an index range scan on mkpf which can not do

multiblock reads (can not be parallelized).

In order to get a parallel executed SQL execution you have to force a

full table scan as well.

...
WHERE mkpf~budat IN s_budatf
     AND mseg~werks IN s_werks
    %_HINTS
    ORACLE 'FULL(T_00) PARALLEL(T_00,5)'.

Note:

Parallelizing this query does probably not make sense since you probably

access only a relatively small portion out of the table i guess. In a multi

user scenario database side parallelization does not make sense as well.

Kind regards,

Hermann

Edited by: Hermann Gahm on Sep 22, 2010 8:34 PM

3 REPLIES 3

former_member192616
Active Contributor
0 Kudos

Hi,

parallel query can only be used with multiblock operations or partitions.

In your case you"ll still see an index range scan on mkpf which can not do

multiblock reads (can not be parallelized).

In order to get a parallel executed SQL execution you have to force a

full table scan as well.

...
WHERE mkpf~budat IN s_budatf
     AND mseg~werks IN s_werks
    %_HINTS
    ORACLE 'FULL(T_00) PARALLEL(T_00,5)'.

Note:

Parallelizing this query does probably not make sense since you probably

access only a relatively small portion out of the table i guess. In a multi

user scenario database side parallelization does not make sense as well.

Kind regards,

Hermann

Edited by: Hermann Gahm on Sep 22, 2010 8:34 PM

0 Kudos

Hi Hermann,

Is it possible to use the parallel hint if the SELECT statement has inner joins (taken from SAP Note 651060)?

0 Kudos

sure, as i showed in my previous post.

Instead of the table names you have to use the aliases (T_00, T_01, ...)

Kind regards,

Hermann