cancel
Showing results for 
Search instead for 
Did you mean: 

Does HANA Column table hash partitioning change automatically redistribute the data ?

Hi,

we have a table containing 4 billion rows. The table is hash partitioned. Initially it did have four partitions. Now we changed the number of partitions to eight by running alter table. The execution of the alter table statement took round about 2 and a half hours. Is the data distributed to all eight partitions in accordance to the hash function now, means did the hana engine redistribute the data already? Or do we have to run another statement to achieve this? How can we check how the various partitions are filled with data ?

best regards

Wolfgang

View Entire Topic
pfefferf
Active Contributor

The data is redistributed automatically. You can check the distribution e.g. in the runtime information for a table (open the table definition in the catalog and switch to tab "Runtime Information").

Following a simple example with a dummy table.

1) A table exists with two partitions - partition 1 has 2 records, partition has 5 records:

2) Doing an enhancement to four partitions using following command:

alter table "MISC"."MISC_NVARCHAR" partition by hash ("ID") partitions 4;

3) Result - table has four partitions - data is automatically redistributed:

A good entry point for table partitioning and redistribution is note 2081591 - FAQ: SAP HANA Table Distribution.

Regards,
Florian