Re: Partition With out use Primary Key
Actually, part of what I said in #3 appears to be wrong, as the following statement fails:
mysql> CREATE TABLE t1 (
-> col1 INT NOT NULL,
-> col2 DATE NOT NULL,
-> col3 INT NOT NULL,
-> col4 INT NOT NULL,
-> PRIMARY KEY(col3),
-> UNIQUE KEY(col1, col2)
-> )
-> PARTITION BY HASH(col3)
-> PARTITIONS 4;
ERROR 1490 (HY000): A UNIQUE INDEX need to include all fields in the partition function
I was under the impression that, if a table had a PK, then UKs didn't matter with regard to the partitioning expression, but this is not the case. My bad.
Jon Stephens
MySQL Documentation Team @ Oracle
MySQL Dev Zone
MySQL Server Documentation
Oracle
Subject
Views
Written By
Posted
4365
July 14, 2006 02:49PM
16416
August 22, 2006 03:10AM
Re: Partition With out use Primary Key
4197
August 22, 2006 07:14AM
4138
September 05, 2006 05:14PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.