Monday, 21 September 2020 05:21

How to find historic record count of column table using :_SYS_STATISTICS.HOST_COLUMN_TABLES_PART_SIZE

Written by Rajarajeswari Kaliyaperuumal
Rate this item
(0 votes)
“© 2020. SAP SE or an SAP affiliate company. All rights reserved.” “Used with permission of SAP SE”

HISTORIC RECORD COUNT USING _SYS_STATISTICS.HOST_COLUMN_TABLES_PART_SIZE

If you have ever wondered how to find the historic row count of any column store table in HANA, this email will help you out!

WAY1 :Execute the below SQL which uses _SYS_STATISTICS.HOST_COLUMN_TABLES_PART_SIZE

select table_name,max(record_count),min(record_count),max(RAW_RECORD_COUNT_IN_MAIN),min(RAW_RECORD_COUNT_IN_MAIN),year(snapshot_id) YEAR,month(snapshot_id) MONTH,dayofmonth(snapshot_id) DAY

 from _SYS_STATISTICS.HOST_COLUMN_TABLES_PART_SIZE

  where table_name=’<TABLE_NAME>

  groupbyyear(snapshot_id),month(snapshot_id),dayofmonth(snapshot_id),table_name

  orderbyyear(snapshot_id),month(snapshot_id),dayofmonth(snapshot_id);

Way 2:Use the SQL:HANA_Tables_TopGrowingTables_Records_History from OSS: 1969700

Download the specified OSS and make the changes as per requirement in modification section.

Modify date as well:

Output:

Hope it was helpful!!
Click on like if you found this article useful and FOLLOW for more such articles!https://people.sap.com/rajarajeswari_kaliyaperumal
Please leave a comment or suggestion!

Read 59 times

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.