Partition Key Makes Unique Index UselessNovember 25, 2015December 17, 2022Normally, we build an unique index for protecting the table from inserting duplicate values of combined columns. If the constraint of the unique index is… Read More »Partition Key Makes Unique Index Useless
Partition Key is NOT Necessarily the First KeyJune 26, 2015December 12, 2022Partition Key in Composite Index If you do believe that the arrangement of positions in a composite index really matters on the whole performance, here… Read More »Partition Key is NOT Necessarily the First Key
How to Resolve ERROR 1697 (HY000): VALUES value for partition must have type INTSeptember 3, 2013December 8, 20222 CommentsERROR 1697 (HY000) Using a date or int column as a partition key is a lot easier than using a timestamp column in MySQL. Because… Read More »How to Resolve ERROR 1697 (HY000): VALUES value for partition must have type INT
How to Resolve ERROR 1564 (HY000): This partition function is not allowedSeptember 2, 2013December 30, 2022ERROR 1564 (HY000) When we used round() function for the partition key, we got ERROR 1564 (HY000). mysql> alter table sales partition by range(unix_timestamp(order_time)) partitions… Read More »How to Resolve ERROR 1564 (HY000): This partition function is not allowed
How to Resolve ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning functionJuly 28, 2013December 8, 2022ERROR 1503 (HY000) Tried to partition a table, but it failed with ERROR 1503 (HY000). Primary Key mysql> ALTER TABLE orders PARTITION BY RANGE(unix_timestamp(order_time)) (PARTITION… Read More »How to Resolve ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function
How to Resolve ERROR 1486 (HY000): Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowedJuly 27, 2013December 8, 2022ERROR 1486 (HY000) When we partitioned a table by a timestamp-typed column ORDER_TIME in table ORDERS, it generated an error 1486 like this: mysql> ALTER… Read More »How to Resolve ERROR 1486 (HY000): Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed