January 2019
Intermediate to advanced
286 pages
7h 41m
English
The concept behind this type of partitioning is to choose a partition according to the value returned by a user-defined expression that works on the column values of the records that are to be added to your table.
To use HASH partitioning on a table, a PARTITION BY HASH clause must be added to the CREATE TABLE command, where your expression is an expression that returns an integer.
The following command creates a table that uses the HASH on the resto_id column and is divided into four partitions:

If you do not specify a PARTITIONS clause at the end of the command, the default number of partitions will be 1; otherwise, PARTITIONS ...