- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Data compression in SAP HANA
In SAP HANA, there are various methods and algorithms that you can use to store data in Column based structure- Dictionary Compressed, Run Length Compressed and many more.
In Dictionary Compressed, cells are stored in form of numbers in tables and numeral cells are always performance optimized as compared to characters.
In Run length compressed, it saves the multiplier with cell value in numerical format and multiplier shows repetitive value in the table.
Compression is calculated using Compression factor. Compression factor refers to the ratio of the uncompressed data size to the compressed data size in SAP HANA.
In SAP HANA, Compression is performed and calculations are done as part of the delta merge operation. If you create an empty column table, no compression is applied initially as the database cannot know which method is most appropriate. As you start to insert data into the table and the delta merge operation starts being executed at regular intervals, data compression is automatically (re)evaluated and optimized.
Automatic compression optimization is ensured by the parameter active in the optimize_compression section of the index server.ini configuration file. This parameter must have the value yes.
To find compression details, you need to first load the table into memory. You can also load a table using SQL command. Open the SQL console and execute the following statement −
LOAD <table_name> UNLOAD <table_name>
Note that when you load a table, it loads the complete data and also delta storage into the main memory of SAP HANA system.
To perform data compression, run the following SQL command to check data compression properties.
SELECT SCHEMA_NAME, TABLE_NAME, COLUMN_NAME, COMPRESSION_TYPE, LOADED from PUBLIC.M_CS_COLUMNS where SCHEMA_NAME = '<your_schema>' and TABLE_NAME = '<your_table>
- Data Compression in SAP HANA system
- Manual compression of a table in SAP HANA
- Checking Compression ratio of a table in SAP HANA
- Generating time data in SAP HANA
- Data Replication techniques in SAP HANA
- Data Preview option in HANA Modeling view in SAP HANA
- Inserting data in table in SAP HANA
- Trigger based SAP HANA data replication
- Real time data replication in SAP HANA
- Performance data of servers in SAP HANA
- Data Provisioning option in SAP HANA Studio
- Inbuilt data provisioning tools in SAP HANA
- Different options in Data Preview in SAP HANA
- Inserting data in a table in SAP HANA
- Tables for generated Time data in SAP HANA