Forum: Building VoltDB Applications

Post: Auto Increments, single partition vs replicated table.

Auto Increments, single partition vs replicated table.
lerchmo
Jul 6, 2011
Currently I am using
CREATE TABLE autopk(
table_name VARCHAR(50) NOT NULL,
current_pk bigint NOT NULL,
primary key (table_name)
);
partitioned on table_name.
This prevents me from incrementing ID's from other single partition stored procedures..
If I make autopk a replicated table, than increment from within other single partitioned stored prodecedures...
Can I ensure that the key's are actually incremented?
(my auto incremented tables will have 100's of rows) so I don't mind a performance hit on the rare occasion the stored procedures have to insert a new value.
Check out this thread
sebc
Jul 29, 2011
Hey,
Sorry for the delay on this reply - you won't be able to insert in that replicated from a single-part procedure, right? So you'll need other mechanics.
Check out this thread for a couple approches that can work for you:
http://forum.voltdb.com/showthread.php?355-Auto-Increment&highlight=Auto+Increment
Cheers,
Seb