HANA systems allows
us to mark column store tables for pre-loading. Tables marked for preloading
will be loaded into memory after index server restart. Tables can be selected
for fully or partially loading.
Requirement: You
want to mark certain important table for pre-loading.
Prerequisite: You
need a database user with DATA ADMIN or CATALOG READ system privilege.
You can refer to
following document if you want to verify if particular table is already marked
for preload or not.
Execute following
steps if the column table is not marked for pre-loading. In this example we will
take table yearlySales from NAFTA schema and will mark it for pre-loading.
Steps:
- Connect to HANA system and open SQL console in HANA studio
- Execute any of following SQL (Execution of all three SQL is not required)
ALTER TABLE
"NAFTA"."yearlySales" PRELOAD NONE; //This SQL will remove the preloading flag of
table.
ALTER TABLE
"NAFTA"."yearlySales" PRELOAD
("YEAR","Product A");
//Partial loading - this will mark the column YEAR and 'Product A' for
pre-loading.
To check the
pre-loading status of this table , execute following command.
Select SCHEMA_NAME ,
TABLE_NAME ,COLUMN_NAME,PRELOAD from TABLE_COLUMNS WHERE SCHEMA_NAME = 'NAFTA'
Below SQL
output shows that table yearlySales is
configured for pre-loading(partial - only two columns).
Related:
Reference: