Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2794

Re: Optimize Query execution : to define wich Work Center pegged the requirement on a material

$
0
0

You could try a subquery to speed up performance.

 

 

 

SELECT crhd~arbpl INTO TABLE post1_plan

FROM       crhd

INNER JOIN kbed ON crhd~objid EQ kbed~arbpl

WHERE kbed~typkz EQ '2'

  AND kbed~plnum IN ( SELECT plnum FROM resb

                      WHERE matnr EQ marc-matnr

                        AND werks EQ marc-werks

                        AND bdter LT day_range_1

                        AND bdart EQ 'SB'

                        AND kzear NE ''

                        AND aufnr NE ''

                    ).

 

 

 

The real solution is to create a new index on table KBED for fields TYPKZ and PLNUM.


Viewing all articles
Browse latest Browse all 2794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>