Page 1 of 1

Preload a table/column during HANA start

Posted: Mon Jan 21, 2013 10:18 pm
by Hay Bouten
SAP HANA uses the lazy-load technique to keep the start-time short. Lazy-load means that a table/column gets loaded on access instead of during the start of the HANA system.

Solution: If load on access (lazy load) is not acceptable, then the"PRELOAD" option can be set for the table/column. If the PRELOAD is set the data of that object is loaded in the main memory on the server. Starting time increases. The PRELOAD can be activated with the ALTER TABLE statement. Below some additional information.
HANA documentation wrote:ALTER TABLE
<preload_clause> ::= PRELOAD ALL | PRELOAD ( <column_name> ) | PRELOAD NONE

PRELOAD sets/removes the preload flag of the given tables or columns. PRELOAD ALL sets preload flags of all columns in the table,PRELOAD ( <column_name> ) sets the flags of columns specified, and PRELOAD NONE removes the flags of all columns.As a consequence, these tables are automatically loaded into memory after an index server start. The current status of the preload flag is visible in the system table TABLES, column PRELOAD, possible values ('FULL', 'PARTIALLY', 'NO') and in
system table TABLE_COLUMNS, column PRELOAD, possible values ('TRUE', 'FALSE').

Example
The preload flags of column b and c are set:
ALTER TABLE t PRELOAD (b, c);

The preload flags of all columns are set:
ALTER TABLE t PRELOAD ALL