List:Cluster« Previous MessageNext Message »
From:Johan Andersson Date:July 14 2011 12:16pm
Subject:Re: ndb partition
View as plain text  

See below:

On 2011-07-14 13.03, hustnn wrote:
> In mysql cluster ,how does the partition works.
> when I load records, is the partition done on *mysql server node(mysqld)*
> which it write records into the right ndbd node  or the *master ndbd node*
> which transform to other right ndbd nodes.
Tables are automatically partitioned  on the data nodes, and the data is 
distributed on the partitions based on the PRIMARY KEY.
You can affect this by using PARTITION BY, which allows you to partition 
on part of the primary key (which can be a good way of grouping 
information togheter).

The MySQL server will calculate a hash on the PRIMARY KEY (or the 
PARTITION BY) and send the request to the data node storing that data.

All data nodes are active and can take on transactions.
> In ndbd node ,there are many directories in path ndb_*_fs such as
> "D1  D10  D11  D2  D8  D9  LCP", there are child directories such as "DBDICT
> DBDIH" in DX and "0 1" in LCP.  what does these directory stand for?
> Partitions or sth others?
D1, D2  -- Meta data information, like what tables, nodes, partitions exists

D8-D11 -- redo log, contains a subdir called DBLQH because that is the 
block in ndbd that writes the REDO log, then you have redo log files 
under that.

LCP  -- checkpoint - two LCPs are written, first in  directory 0 and 
then 1, then 0 again and so on.

Best regards,

skypeid: johan-at-mysql

> --
> View this message in context:
> Sent from the MySQL - Cluster mailing list archive at

ndb partitionhustnn14 Jul
  • Re: ndb partitionJohan Andersson14 Jul