Quantcast
Channel: SAP HANA Central
Viewing all articles
Browse latest Browse all 711

HANA – table unload priorities

$
0
0
Many people still think all data in HANA which exists in the data area also loaded into memory all the time. Of course there are some techniques which influence the unload / placement of tables e.g. data aging and the non-active data concept of BW. Usually unloads happen based on a “least recently used” (LRU) approach, so the columns having not being used for the longest time are unloaded first. So HANA decides when it makes sense to unload some tables to free memory.

But what about your own tables? Can you also take influence when data are unoaded? For general information you can refer to 2127458– FAQ: SAP HANA Loads and Unloads. Ok you can manually unload or load tables. But you want to do this automatically and want to understand when tables are loaded or unloaded.

Ok, may be you know the un-/load traces on the filesystem. But you don’t know why this happen.

At first you have to know that there are unload priorities:

SAP HANA Tutorials, SAP HANA Materials, SAP HANA Certifications, SAP HANA Guide

Than you need to know about the different disposition weights a table can have:

SAP HANA Tutorials, SAP HANA Materials, SAP HANA Certifications, SAP HANA Guide

You can select the current unload prio valies from sys.tables:

select table_name, unload_priority from sys.tables;

SAP HANA Tutorials, SAP HANA Materials, SAP HANA Certifications, SAP HANA Guide

You can see this dispositions if you use the tool hdbcons with option ‘pageaccess a’:

DefaultPageTypeSizeClsDispositionhasRefsCountMemorySize 
ConvIdxPage256kTemporaryyes1262144
ConvLeafPage256kTemporaryyes20252953088 
FileIDMappingPage256kTemporary yes 164194304
FileIDMappingPage256kShortterm yes 252 66060288 
ContainerDirectoryPage256kLongtermyes1019267124736 
ContainerDirectoryPage256kLongterm no 22 5767168 
ContainerNameDirectoryPage256k Longterm no 5915466496 
UndoFilePage64kShortterm yes425 27852800 
VirtualFilePage4kInternalShorttermno 53508 219168768
VirtualFilePage16kInternalShortterm no 58164 952958976 
VirtualFilePage64kInternalShorttermno 407422670067712 
VirtualFilePage256kInternalShorttermno 231686073352192
RowStorePageAccess PageTypeSizeClsDispositionhasRefsCountMemorySize 
ConvIdxPage256kTemporaryyes1262144
ConvLeafPage256kTemporaryyes29577332480
RowStorePage16k-RowStoreNonSwappable no 67174411005853696

As you may be know the RowStore uses the shared memory of the linux system and with HANA it can’t be unloaded from memory. So the type RowStorePage has every time the disposition ‘Nonswappable’.

SAP HANA Tutorials, SAP HANA Materials, SAP HANA Certifications, SAP HANA Guide

Per default a CS table has the unload priority 5. The last access is 10 hours ago.

The Page Cache has the unload priority short term and the last access is one hour ago.

The column table has the lower result value (270 vs. 300) and so it is unloaded earlier than the pages of the page cache.

If there are tables that should in general be replaced earlier or later, you can prioritize unloads using the UNLOAD PRIORITY setting:

ALTER TABLE "<table_name>" UNLOAD PRIORITY <priority>;

The SAP standard tables shouldn’t be changed without any good reason.

Viewing all articles
Browse latest Browse all 711

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>