Quantcast
Channel: SCN : All Content - SAP on SQL Server
Viewing all articles
Browse latest Browse all 837

SQL database performance issue caused by disabled sap_IndexStatsMaintenance?

$
0
0

Hi experts,

  Users complain some ABAP programs run slowly all of a sudden. I check ST03 -> average background job response time but it is not getting worse. I run and enabled sap_IndexStatsMaintenance. Will it solve the problem? If not, is it ok to drop all proc cache at midnight?

------

I use SAT and find the program spended 94% on

 

SELECT mseg~matnr mseg~bukrs mkpf~usnam AS ernam mkpf~budat AS erdat    "$05
INTO CORRESPONDING FIELDS OF TABLE itab                               "$05
FROM mkpf INNER JOIN msegON mseg~mjahr = mkpf~mjahr
AND mseg~mblnr = mkpf~mblnr
WHERE mkpf~budat IN s_erdatAND mseg~matnr IN s_matnr
AND mseg~bwart = zbwart .
DELETE itab WHERE bukrs <> l_bukrs.
ENDIF.

 

and number of rows of sequential read are not increased.

------

and ST05 shows SQL server used the right index:

Index seek: MSEG~Z02(by the way, users select only the last day 2015/5/11 ~ 2015/5/11)

Clustered index seek: MSEG~0

Clustered index seek: MKPF~0

 

/****** Object:  Index [MSEG~Z02]    Script Date: 5/12/2015 6:14:18 PM ******/

CREATE NONCLUSTERED INDEX [MSEG~Z02] ON [tcp].[MSEG]

(

  [MANDT] ASC,

  [/BEV2/ED_AEDAT] ASC,

  [BWART] ASC,

  [WERKS] ASC,

  [LGORT] ASC,

  [MATNR] ASC,

  [SOBKZ] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

GO

 

sap_IndexStatsMaintenance.jpg


Viewing all articles
Browse latest Browse all 837


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