Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
nLoad and unload a table in SAP HANA using SQL query
In SAP HANA, it is possible to manually load and unload individual tables and table columns for memory management purposes.
- You can perform loading of table to precisely measure the total or "worst case" amount of memory used by a particular table.
- A table is unloaded from database to actively free up memory space.
Basic Load and Unload Syntax
You can use the following SQL queries to perform load/unload operations on tables −
LOAD <table_name> UNLOAD <table_name>
Loading a Table
To load a specific table into memory, use the LOAD command. This ensures the table data is fully loaded into the database memory −
LOAD EMPLOYEES;
This command loads the EMPLOYEES table completely into memory, allowing you to measure its exact memory footprint.
Unloading a Table
To remove a table from memory and free up resources, use the UNLOAD command −
UNLOAD EMPLOYEES;
This command removes the EMPLOYEES table from memory, making that memory available for other operations.
Loading Specific Columns
You can also load specific columns of a table instead of the entire table −
LOAD EMPLOYEES (EMPLOYEE_ID, FIRST_NAME, LAST_NAME);
This selective loading helps optimize memory usage by loading only the required columns.
These commands are particularly useful for memory optimization and performance tuning in SAP HANA environments where precise control over table loading is required.
