I have a table that essentially looks like this:
CREATE TABLE myTable (
id INT auto_increment,
field1 TINYINT,
field2 CHAR(2),
field3 INT,
theDate DATE,
otherStuff VARCHAR(20)
PRIMARY KEY (id)
UNIQUE KEY (field1, field2, field3)
)
I'd like to partition the table based on the month and year of theDate
, however the manual is telling me I'm not allowed:
All columns used in the partitioning expression for a partitioned table must be part of every unique key that the table may have. In other words, every unique key on the table must use every column in the table's partitioning expression
What are my options here? Can I still partition the table?