Sap Hana Memory Configuration Guideline Learning How To Manage Hana Memory
Sap Hana Memory Configuration Guideline Learning How To Manage Hana Memory
Be aware that "Used memory" over time grows as it is storing all data which are
increasing year after year.
Queries and query results, caching, calculation are also part of the "Used memory". Bad
or long queries will influence the state of the "used memory"
2/9
How to get current sap hana tenant database used
memory?
Note : Connect to a tenant database and execute the following query. To obtain used
memory for all databases run the sql query at the SYSTEMDB level.
NB : Keep in mind, sap hana data tables and temporary result are stored in the
indexserver used memory area.
Connected to the relevant tenant database before running the following query to check
used memory for that specific database.
3/9
select top 1 HOST,
SERVER_TIMESTAMP,
round(INSTANCE_TOTAL_MEMORY_USED_SIZE/1024/1024/1024) as "Peak Used Memory GB"
from _SYS_STATISTICS.HOST_RESOURCE_UTILIZATION_STATISTICS
order by "Peak Used Memory GB" desc;
How to check sap hana column table total size per schema?
You may want to find out why used memory is growing up. Looking at the column table
total size growth per schema can be relevant during a batch heavy load transaction.
How to check sap hana row table total size per schema?
Sap hana engine will decide which tables to bring into the memory and how long they
will stay. The move to the memory area or to the disk can occur at any time depending
on the need for memory space.
select schema_name,
round(sum(USED_FIXED_PART_SIZE + USED_VARIABLE_PART_SIZE)/1024/1024, 2) as "Row Tables
MB Used"
from M_RS_TABLES
group by schema_name
order by "Row Tables MB Used" desc;
6/9
select SCHEMA_NAME,
TABLE_NAME,
round((USED_FIXED_PART_SIZE + USED_VARIABLE_PART_SIZE)/1024/1024, 2) as "MB Used"
from M_RS_TABLES
where SCHEMA_NAME = 'SYS'
order by "MB Used" desc, TABLE_NAME;
7/9
The term "Resident memory" is looking at memory used at physical level where as the
term "Memory used" is looking at memory at the memory allocation pool level. The two
though, have lots in common as their size grows and shrinks according to data, queries,
calculation and other operations.
9/9