Skip to Content
0

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

Mar 09, 2017 at 08:13 AM

362

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Florian Pfeffer
Mar 10, 2017 at 08:13 AM
0

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


Share
10 |10000 characters needed characters left characters exceeded