Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hi folks,

do you have long runtime of update statistics in your SAP MaxDB database e.g. after system copy, huge data import etc., huge delete jobs?
Then i have good news - update statistics can run  now in parallel fully integrated into transaction DBACOCKPIT for SAP customer.

Update Statistics in parallel in a SAP System:


Precondition: As of the following SAP-Releases in combination with SAP MaxDB Versions the update Statistics is now started in parallel.
SAP Release 7.02 SP16
SAP Release 7.30 SP12
SAP Release 7.31 SP13
SAP Release 7.40 SP08
SAP Release 7.41 SP00

AND
SAP MaxDB Version 7.8.02 >= 40 or 7.9.08.22 are necessary to run this new feature.

What's different?
As of these SAP Releases/ MaxDB version combination  the DBSL Interface is not used anymore to log tables relevant for update statistics and trigger the update statistic via only one work process (sequentially).

How does it work?
This new feature now uses a DBprocedure SYSCHECKSTATISTICS to  ensure that all tables which need new optimizer statistics are stored in system table SYSUPDSTATWANTED. Note: table DBSTATC is not used anymore.

Actions to run update Statistics:
You can decide if you want to mark all tables for update statistics whithout any checks if the update statistics is really necessary

Action to choose: Update all Optimizer Statistics (UPDALLSTAT) - the new dbprocedure inserts all tables into MaxDB system table SYSUPDTSTATWANTED and creates new optimizer Statistics via command  update Statistics as per system table which is executed in parallel for all tables.

==> the performance improvement depends on the number of data volumes and the number of CPUs.

You can also decide to do the update staitsitcs in 2 steps.
1. Step:

Action: Select Tables for Update Statistics (PredUPDStat) checks all tables if new optimizer statistics are necessary. This check is done as well with the new dbprocedure, tables which are detected as relevant for new optimizer statistics are inserted into System table SYSUPDSTATWANTED.
:!: Please notice statistic relevant tables are not stored anymore in SAP table DBSTATC. Systemtable DBSTATC is not relevant anymore for MaxDB update statistics.

2. Step:
Action: Update Statistics for Selected Tables (UPDSTATS) executes the update statistics in parallel via the command update statistics as per system table.

We are interrested in your feedback.

Regards, Christiane