I have a Galera cluster with 3 nodes. On it, there are several tables, let's for the sake of argument assume some of them are:
CREATE TABLE customer (id INT PRIMARY KEY AUTO_INCREMENT, name TEXT);
CREATE TABLE item (id INT PRIMARY KEY AUTO_INCREMENT, name TEXT);
I want ids in the customer
table to be as close to sequential (1, 2, 3...) as possible.
So far, it looks like ids increment by 3 per new customer. I'd like to make it 1.
On the other hand, the values of ids in the item
table don't matter, but it should be possible to insert into this table with minimal or no locking.
Is it possible to have sequential ids in a Galera cluster, or at least almost sequential?