Partitioning MySQL

This is purely for the sake of partitioning. In this example, I’ll quickly partition the wordpress comments table into partitions. The hash partition ensures data are evenly distributed across partitions.

Now check that queries are only reaching out to necessary partitions

The hash function can be overridden with any function that returns an integer. For example, I can use mod(some_id,2) to divide some_id into two groups – even…

Read More