开发者

How to Partitioning a table using a LIKE criteria in Mysql

开发者 https://www.devze.com 2023-02-19 17:58 出处:网络
I\'ve a large table to partition by value of a field of varchar(200) type. I have already read this question but because the size of the field I cannot use this solution.

I've a large table to partition by value of a field of varchar(200) type. I have already read this question but because the size of the field I cannot use this solution.

My question is: Can I use a Like criteria as LIKE 'b%' or LIKE 'o%' and so on?

If not, How can I solve this?

Thanks in adva开发者_JAVA百科nce,

Antonio


You'd better specify the range as

less than ('c')

It is short and readable.


It seems that partitioning on varchar is allowed only if partitioning is by key (no duplicate values and no null values allowed).

Here a discussion

I tried to perform partitioning using a function that "converts" to integer values as ASCII(), but it doesn't compare in Mysql supported functions in partitioning expression.

List of supported functions

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号