1

On my HANA database, I executed delta merge on a few tables that I had executed a number of INSERT statements

I see that the merge command is completed successfully

On the other hand, when I query M_CS_TABLES table, I see that the MEMORY_SIZE_IN_DELTA is bigger than zero and a high percentage when compared with MEMORY_SIZE_IN_MAIN. I was expecting to see 0 or a less percentage in fact.

Could you please help me to understand this delta merge and memory size in delta issue?

I created sample column tables in my schema on a HANA database and populated with data using INSERT commands. Then I executed following command

MERGE DELTA OF "SALESORDERHEADER";

To query merge statistics for column tables,

select * from M_CS_TABLES where schema_name = Current_schema;

Although the table sizes are quite small, I expected the delta or row-store section of the tables to be near zero

Additionally, RAW_RECORD_COUNT_IN_DELTA for all tables are 0 as I understand this means there are no records waiting in delta to be merged.

enter image description here

For column based statistics, I executed

select * from M_CS_ALL_COLUMNS
where schema_name = Current_schema and table_name = 'SALESORDERHEADER';

Output is as

enter image description here

Eralper
  • 6,461
  • 2
  • 21
  • 27
  • Can you post the commands you used and the relevant columns of `M_CS_ALL_COLUMNS` for the table in question? – Lars Br. Mar 15 '19 at 23:09
  • Thank you Lars for responding, I have added SQL commands I used and output of the delta merge as seen in M_CS_TABLES and M_CS_ALL_COLUMNS – Eralper Mar 16 '19 at 07:40

1 Answers1

0

Thanks for adding the information.

When you look at the sizes of the delta stores for each column (M_CS_ALL_COLUMNS) you see that most of the values are really close to 8K (8196 bytes). That's no accident, but the internal minimal allocation size for delta store structures.

So, yes, if there are no entries to be merged left, each column of a column store table still has a - at least 8K sized - delta store memory structure "hanging on to it".

Your remark about the relative size of this delta store is valid, but it is important to recognize that this table is tiny. 480KB is virtually nothing in terms of database tables.

And for such tiny tables, column store structures generally are less space efficient than other data structures. This of course changes, once you load data volumes for which you want/need a column store. Then compression, parallelization, CPU cache friendliness etc. all way up the additional memory used for empty delta stores.

Anyhow, all good here, nothing to see ... move on :-D

Lars Br.
  • 9,949
  • 2
  • 15
  • 29