February 2018
Intermediate to advanced
510 pages
16h 10m
English
This type of partitioning is similar to HASH partitioning, with the change of the use of a user-defined expression instead of the hashing function. KEY PARTITIONING uses the PARTITION BY KEY clause in the CREATE TABLE statement for the partitioning definition. The syntax rules for KEY partitioning are similar to that of HASH partitioning, so let's list out the differences so as to understand:
One or more column names list is taken in KEY(), and if there is no column defined in KEY but the table has a defined primary key or unique key with the NOT NULL constrain, the column is automatically taken as partitioning column for KEY:
CREATE TABLE tk1 ( tk1_id INT NOT NULL PRIMARY KEY, ...
Read now
Unlock full access