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

Too many plants existing in SAP causing db choose wrong index

$
0
0

Hi Expert,

 

There're about 130 plants in our SAP. From last month, there're SQL running timeout dumps sometimes.

When I trace the log I found that the DB tends to choose index of 'WERKS'(plant) to find data.

 

for example,

select xxxxx

   from vbap

   inner join vbak on vbak~vbeln = vbap~vbeln

   into corresponding fields of table xxxxx

   where vbak~erdat in s_erdat

       and vbap~werks eq p_werks.

 

For there is SO data for about 5 years in our SAP. So choosing the index of vbak-erdat is preferable, what is the DB did before last month.

This month I found the DB tends to choose the index of vbap-werks so that causing SQL timeout.

 

Are there some solutions?

I cannot use the key work 'HINT', for there are mass number of reports, queries involved, from vbap-werks to ekpo-werks,

from marc-werks to mseg-werks.

 

What is worse, we may involve 40 more plants next year...


Viewing all articles
Browse latest Browse all 9190

Trending Articles



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