content_image/770652.jpg content_image/770653.jpg
You can cause the data to be redistributed among all of the data nodes by performing, for each NDB  table, an ALTER TABLE ... ALGORITHM=INPLACE, REORGANIZE PARTITION  statement in the mysql client. 

<img src='content_image/770652.jpg'>

## Important 

ALTER TABLE ... ALGORITHM=INPLACE, REORGANIZE PARTITION  does not work on tables that were created with the MAX_ROWS  option. Instead, use ALTER TABLE ... ALGORITHM=INPLACE, MAX_ROWS=...  to reorganize such tables. 

Keep in mind that using MAX_ROWS  to set the number of partitions per table is deprecated, and you should use PARTITION_BALANCE  instead; see Section 13.1.20.11, “Setting NDB_TABLE Options” , for more information. 

After issuing the statement ALTER TABLE ips ALGORITHM=INPLACE, REORGANIZE PARTITION , you can see using ndb_desc  that the data for this table is now stored using 4 partitions, as shown here (with the relevant portions of the output in bold type): 

shell> ndb_desc -c 198.51.100.10 -d n ips -p -- ips -- Version: 16777217 Fragment type: 9 K Value: 6 Min load factor: 78 Max load factor: 80 Temporary table: no Number of attributes: 6 Number of primary keys: 1 Length of frm data: 341 Row Checksum: 1 Row GCI: 1 SingleUserMode: 0 ForceVarPart: 1 FragmentCount: 4 TableStatus: Retrieved -- Attributes -- id Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR country_code Char(2;latin1_swedish_ci) NOT NULL AT=FIXED ST=MEMORY type Char(4;latin1_swedish_ci) NOT NULL AT=FIXED ST=MEMORY ip_address Varchar(15;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY addresses Bigunsigned NULL AT=FIXED ST=MEMORY date Bigunsigned NULL AT=FIXED ST=MEMORY -- Indexes -- PRIMARY KEY(id) - UniqueHashIndex PRIMARY(id) - OrderedIndex -- Per partition info -- Partition Row count Commit count Frag fixed memory Frag varsized memory 0 12981 52296 1572864 557056 1 13236 52515 1605632 557056 2 13105 13105 819200 294912 3 13093 13093 819200 294912 NDBT_ProgramExit: 0 - OK 

<img src='content_image/770653.jpg'>

## Note 

Normally, ALTER TABLE table_name  [ALGORITHM=INPLACE,] REORGANIZE PARTITION  is used with a list of partition identifiers and a set of partition definitions to create a new partitioning scheme for a table that has already been explicitly partitioned. Its use here to redistribute data onto a new NDB Cluster node group is 

