There are 5 types of table partitions in mysql: range, list,
hash, key and composite (or subpartitioning), i think the most
commonly used type in the database world (at least in oracle)
could be range partition, in this way a expression is evaluated
and according to it different partitions are created with ranges
of rows. The most common method to partition by range is using
dates (by years,months,days) to group large amounts of rows from
a table, mysql does not support partition by date type directly
(oracle does), instead a function like year() or month() should
be used to get an integer value.
Playing with this partition type, first i tried to create a table
with a primary key on the id column and the partition column
using insert_date, but MySQL generates an error if the column
insert_date is not part of the primary key:
[Read more]
mysql> CREATE TABLE range_partition_tab (
-> id numeric …