SAP Note 1558087 - SQL Server Statistics Maintenance

Component : Microsoft SQL Server -

Solution : https://service.sap.com/sap/support/notes/1558087 (SAP Service marketplace login required)

Summary :
SAP transactions utilizing date columns experience slowdowns, particularly post-new year due to outdated statistical data. SQL Server optimizer's misjudgment on the volume of recent year data worsens the issue. The remedy involves running the sap_IndexStatsMaintenance stored procedure on SQL Server 2005 or newer to refresh date column stats. The stored procedure traces columns potentially holding dates and updates their stats based on changes. Users can configure execution, targeted columns, change percentage threshold, and update mode through customizable parameters.

Key words :
setuser '<sid>'exec sap_indexstatsmaintenancegoto check, sql server update statistics command, <sid>setuser '<sid>'gomake, setuser '<sid>'exec sap_indexstatsmaintenance 1, setuser '<sid>'exec sap_indexstatsmaintenance 0, sql server optimizer assumes, sql server books online, sql server management studio, sql server agent job, stored procedure supports 4 parameters

Related Notes :

1155989Wrong index statistics on SQL Server for JAVA
771352Manual UPDATE STATISTICS re-enables Disabled Automatic Stats
155413Analysis of slow SQL statements