Swastik
Swastik

Reputation: 396

Will AUTO_INCREMENT id be unique for a table with Partitions in MariaDb?

I've a use case where I want to create partitions on table and that table has AUTO_INCREMENT field. Let's say I've defined Partition Strategy while creating table. For example if a table my_table with field id as AUTO_INCREMENT and has 4 partitions p0_my_table, p1_my_table, p2_my_table, p3_my_table.

Now my question is Will id be unique across all partitions OR will id be unique within each partition.

Upvotes: 0

Views: 91

Answers (1)

O. Jones
O. Jones

Reputation: 108806

Will AUTO_INCREMENT id be unique for a table with Partitions in MariaDb?

Yes, it will be unique across partititions.

Upvotes: 0

Related Questions