Is it possible to partition based on char column?
After reviewing the MySQL 5.1 documentation it appears that only integer types can be used.
Is this correct? Or can I use some function to convert the char into an integer?
The char field in question contains a unique identifier.
Partitioning in MySQL 5.1 can only deal with integer columns (Source). You can only use a few partitioning functions on non-integer columns. For example:
You can also use key partitioning in MySQL 5.1, as long as the primary key includes all the columns in the table’s partitioning function:
On the other hand, in MySQL 5.5, you can use range column partitioning or list column partitioning on a wide variety of data types, including character-based columns.
List Columns Example:
Range Columns Example:
Further reading: