Tiven Wang
Wang Tiven September 26, 2017
425 favorite favorites
bookmark bookmark
share share

Data Compression in the Column Store

https://help.sap.com/viewer/6b94445c94ae495c83a19646e7c3fd56/2.0.02/en-us/bd9017c8bb571014ae79efaeb46940f3.html

SAP HANA 数据库的列存储数据有两类压缩:

  • 字典压缩 (Dictionary compression): This default method of compression is applied to all columns. It involves the mapping of distinct column values to consecutive numbers, so that instead of the actual value being stored, the typically much smaller consecutive number is stored.
  • 高级压缩 (Advanced compression): Each column can be further compressed using different compression methods, namely prefix encoding, run length encoding (RLE), cluster encoding, sparse encoding, and indirect encoding. The SAP HANA database uses compression algorithms to determine which type of compression is most appropriate for a column. Columns with the PAGE LOADABLE attribute are compressed with the NBit algorithm only.

https://www.tutorialspoint.com/sap_hana_administration/sap_hana_administration_data_compression.htm

select SCHEMA_NAME, TABLE_NAME, MEMORY_SIZE_IN_TOTAL from PUBLIC.M_CS_TABLES
  where SCHEMA_NAME='SCHEMA_NAME' and TABLE_NAME='TABLE_NAME';

select compression_type, index_type, implementation_flags, count(*)
  from m_cs_columns where schema_name not like '%SYS%'
  group by compression_type, index_type, implementation_flags
  order by count(*) desc

Similar Posts

Comments

Back to Top