cancel
Showing results for 
Search instead for 
Did you mean: 

Update statistic

baby_fabrice
Participant
0 Kudos

Hi,

I would like to know what is the way to update database statistic.

I have check quickly in DB02 and in DB13 but i have nothing for launch this type of action.

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

baby_fabrice
Participant
0 Kudos

Thx for your help you two.

Former Member
0 Kudos

Hi my friend

SAP strongly recommends to set the database options "auto create statistics" and "auto update statistics". SQL Server 2005 introduced a new database option, which is also recommended: "auto update statistics async". You can set all three database options for the <SID>-database by executing the following SQL script:

alter database <SID> set auto_create_statistics on

alter database <SID> set auto_update_statistics on

alter database <SID> set auto_update_statistics_async on

Regards,

Former Member
0 Kudos

Hi Guys,

Apart from enabling the three parameters in SQL 2005 mentioned by Fan Yu, you should also consider updating statistics manually with sql agent job.

Auto update statistics has some exceptions, it will not update the statistics of table unless the table is modified by 20%, which is quite high when you are dealing with large tables consisting millions of row.

you can update statistics manually by the T-SQL commands:

1.) sp_updatestats

2.) sap_updatestats forcesample

Please read this MSDN blog:

http://blogs.msdn.com/saponsqlserver/archive/2007/05/22/sap-application-leveraging-sql-server-automa...

Hope it helps

Thanks