Horizontal partitioning in MySQL 8
As mentioned, horizontal partitioning will create more than one partition of the data. Each partition will have the same number of columns. Different partitioning techniques are used to divide the page into multiple partitions. Consider the following figure for horizontal partitioning:
The following is the list of partitioning types supported in MySQL 8:
- Range partitioning
- List partitioning
- Hash partitioning
- Columns partitioning
- Key partitioning
- Sub partitioning
Let's understand each partitioning type in detail.
Range partitioning
When partitioning is done based on expressions that contain contiguous non-repetitive values of ranges, it is known as range partitioning. The expression for range partitioning contains the key VALUE LESS THAN
operator.
There are multiple data types, based on which we can partition the table:
CREATE TABLE access_log ( log_id INT NOT NULL, type VARCHAR(100), access_url VARCHAR(100), access_date TIMESTAMP NOT NULL, response_time INT NOT...