FOREIGN KEYs in MySQL Cluster is a big step
forward. It is now possible to run enterprise software with NDB
Cluster as the storage backend. Over the years, the lack of
FOREIGN KEYs have been one of the most limiting pieces of
functionality. Who wants to fiddle with TRIGGERs or recode
applications to enforce data integrity?
But finally, it is here. It is implemented natively at the Data
Node level, where NDB stores its data. It is well known that
FOREIGN KEYs come with an overhead. E.g., when writing a record
into a child table, the existence must be checked in the parent
table. Since data is distributed across multiple Data Nodes, the
child record and parent record may be on different nodes or
shards (Node Groups). Hence there is extra work to be done in
terms of internal triggers and network communication, the latter
being the more costly. The performance impact must be taken into
account when doing …
[Read more]