MySQL Forums
Forum List  »  NDB clusters

Re: composite column for primary key in cluster
Posted by: Mikael Ronström
Date: February 18, 2015 06:37PM

Composite primary keys are ok to use. The overhead is mainly in that you need to communicate the entire primary key (up to 60 bytes in your case) for each key lookup for updates, inserts and keyed reads. A smaller key means less bytes in the primary key to send over to the data node. Apart from that the execution inside the data node is almost as quick, it has to transport a bit more data internally but not drastically much more.

So it is an optimisation to use short primary keys, but then I gather that composite keys have other advantages in your case that might still make it
worthwhile to use them.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: composite column for primary key in cluster
955
February 18, 2015 06:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.