# Partitioning issues

**URL:** <https://forums.percona.com/t/partitioning-issues/21712>\
**Category:** MariaDB Server & Utilities\
**Created:** [April 27, 2023, 2:10pm UTC](https://forums.percona.com/t/partitioning-issues/21712 "2023-04-27T14:10:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dba1](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dba1/32/24223_2.png) [@Dba1](https://forums.percona.com/u/Dba1)\
**Post date:** [April 27, 2023, 2:10pm UTC](https://forums.percona.com/t/partitioning-issues/21712/1 "2023-04-27T14:10:25Z")

</div>

I tried to partition a table that has one unique index in the table.  
I got error 1503 when I did my partitioning;  
A unique index must include all columns in the table’s partitioning function. I partitioned using date column. I believe I must have composite unique index on the column I’m using for partitioning . I have included this but still getting error.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 27, 2023, 2:44pm UTC](https://forums.percona.com/t/partitioning-issues/21712/2 "2023-04-27T14:44:44Z")

</div>

Hello @Dba1,  
The partitioning column must be part of every unique index. Since PRIMARY KEY is unique, the column must be part of the PK too.
