This post is about partitioning a MySQL table by year by using range partition type. This post does not deal with the theories on partition, if you would like to understand the complete partitioning methods and types visit the official MySQL documentation. In this post we are directly focus on the implementation steps, assuming that we have knew the basics of MySQL partitioning types and its usages.
Step 1: Create a test database:CREATE DATABASE partitiontest;USE
partitiontest;
| Database definition |
Step 2: Create a test table with partition definition:CREATE
TABLE parttable (rollno INT, name VARCHAR(50), birthdate …