MySQL Forums
Forum List  »  NDB clusters

Ndb Cluster and auto_increment
Posted by: Martin Sköld
Date: February 21, 2017 04:52AM

There was a question in the InnoDB clusters section on how auto_increment works in MySQl (Ndb) Cluster.
The topic was closed so I answer here. Auto_increment values are stored in Ndb Cluster as global counters (per table) and each increment needs to be synched with the data nodes (this is transparent to the user).
To improve performance and limit communication auto_increment values can be prefetched to each MySQL server as a sequential range of values. These values are then allocated to that specific server connection and will not be reclaimed if it disconnects from the cluster. This can be controlled by the ndb_autoincrement_prefetch_sz parameter. Setting this > 1 will create jumps in the sequences seen on each server connection. The sequence will of course be monotonically growing, but one cannot rely on it to be sequential.

Options: ReplyQuote


Subject
Views
Written By
Posted
Ndb Cluster and auto_increment
1327
February 21, 2017 04:52AM


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.