Xtradb Cluster primary key

Hi,
I would like to ask the multi-column primary keys are supported with XtraDB Cluster?

Thanks for reply!

2 Likes

Hi @fozoka - welcome to the Percona forums!
Yes! PXC does support composite keys! so if you are used to having multiple columns in your primary key when using Percona Server for MySQL, you may continue to do so also in PXC.
The general guidance is to keep Primary Keys short i.e. int unsigned auto_increment is generally the best PK to use but of course there are reasons to use composite keys :slight_smile:

2 Likes