on 2025 Jan 30 7:41 AM
Good Afternoon,
I have purged a table named ZEXAMPLE stored in SAPHANADB.
I check the disk size of this table with the following query:
SQL> select TABLE_NAME, DISK_SIZE from M_TABLE_PERSISTENCE_STATISTICS where SCHEMA_NAME='SAPHANADB' and TABLE_NAME='ZEXAMPLE';
But this query returns an old value, that does not take into account my deletions.
1. Would you know which Hana Job refreshes the table sizes statistics ?
2. How could I force a refresh of the M_TABLE_PERSISTENCE_STATISTICS for the table SAPHANADB.ZEXAMPLE ?
3. How could I force a refresh of the statistics for the tables that belong to the Schema SAPHANADB ?
Have a nice day.
Request clarification before answering.
Good morning,
I’m revisiting this question as it seems there has been no response so far.
It’s a pity — the SAP Community has unfortunately lost some of its engagement with recent platform upgrades.
For anyone who might encounter the same issue, and since SAP’s documentation on this topic is not very detailed, here are the key points and steps that may help:
The job that updates these statistics is View Global_Table_Persistence_Statistics with ID 5010.
To check when these statistics were last updated, connect to the HANA tenant corresponding to your ABAP instance, and run the following commands:
su - sidadm
hdbsql -i 00 -d SID localhost:30013 -u system
SQL> SELECT ID, STATUS, INTERVALLENGTH, RETENTION_DAYS_DEFAULT, LATEST_START_SNAPSHOT_ID FROM _SYS_STATISTICS.STATISTICS_SCHEDULE WHERE ID = 5010;
Example output:
5010, "Idle", 60, 365, "2025-11-05 06:42:50.000000000"
SAP does not provide a built-in tool to trigger this job manually (“Start Now”).
The simplest approach is to temporarily reduce the job interval so that it runs sooner.
Below is an example procedure:
Check the ABAP spool (SP01) disk size
SELECT (disk_size) FROM m_table_persistence_statistics WHERE table_name='TST03';
Example result: 5129850464
Check when the job last ran
SELECT ID, STATUS, INTERVALLENGTH, RETENTION_DAYS_DEFAULT, LATEST_START_SNAPSHOT_ID FROM _SYS_STATISTICS.STATISTICS_SCHEDULE WHERE ID = 5010;
Temporarily set the interval to 1 minute
UPDATE _sys_statistics.statistics_schedule SET intervallength=60 WHERE ID=5010;
Verify the job execution
SELECT ID, STATUS, INTERVALLENGTH, RETENTION_DAYS_DEFAULT, LATEST_START_SNAPSHOT_ID FROM _SYS_STATISTICS.STATISTICS_SCHEDULE WHERE ID = 5010;
Restore the default interval
UPDATE _sys_statistics.statistics_schedule SET intervallength=21600 WHERE ID=5010;
Confirm that the statistics have been refreshed
SELECT (disk_size) FROM m_table_persistence_statistics WHERE table_name='TST03';
Example updated value: 5107056784
I hope this helps others facing the same question.
Have a great day
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.