cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle update statistics for selected tables in SAP

Former Member
0 Kudos

Hello,

We are using oracle 11g in our SAP ERP system. We had a problem with one business job for long sequential read of one business table. When checked for that table in DB20, last statistics was executed four months back. So we executed the statistics for that table alone in DB20 and scheduled the job again. The job is completed immediately.

Now we want to execute the statistics for selected business tables every week scheduling as a periodic job. Please let me know how we can achieve this.

Thanks and Regards,

Anand

Accepted Solutions (0)

Answers (2)

Answers (2)

thiago_cavalheiro
Active Participant
0 Kudos

Hi Anand,

It is likely that the default of 50% of changes is too high for some tables in your system. If that is the case, you have the option of setting the stats_change_threshold parameter in your init<SID>.sap to a lower value to avoid this from happening again.

Best regards,

Thiago

JamesZ
Advisor
Advisor
0 Kudos

Hi Anand,

Have you scheduled db13 statistics update job?

If you did, we need to focus on why the job exclude those tables. Or we can customize the statistics job as mentioned in SAP note:

106047 - DB21: Customizing the DBSTATC

Best regards,
James

Former Member
0 Kudos

Hi James,

Yes, the update statistics jobs is running in db13 daily basis.

Best Regards,

Anand

JamesZ
Advisor
Advisor
0 Kudos

Hi Anand,


If so, you can edit DBSTATC, to change active column to U.

Best regards,
James

Former Member
0 Kudos

Hi James,

Thanks for the help.

Is there any issue will occur if we change default settings in DBSTATC table?

I do not want to run the selected tables during daily statistics job. Is there any report to schedule the statistics for selected tables weekly basis?

Best Regards,

Anand

Reagan
Advisor
Advisor
0 Kudos

The table DBSTATC is a control table used by BR*Tools / DB13 for the statistics update.

The DB13 jobs checks this table before the statistics collection which is then triggered using BR*Tools. As long as you maintain the entries correctly there will be no issues. If you do not want to include these tables in the daily statistics collection then create a cron script / batch job at the OS level to have it triggered whenever you want the statistics collection to be done. Also there is no need to schedule DB13 statistics collection everyday. Once in a week should be sufficient.

JamesZ
Advisor
Advisor
0 Kudos

Hi Anand,

DBSTATC is used for customizing, so there won't be any issue.

In this case, you can try to create a external command brconnect job in sm36.

Best regards,
James