gpt4 book ai didi

MYSQL 5.5分区表按第一个字符0-9a-zA-Z

转载 作者:行者123 更新时间:2023-11-29 02:22:31 24 4
gpt4 key购买 nike

我想在字符字段中的第一个字符上创建一个范围分区。该字段具有标签值并且区分大小写 0-9a-zA-Z

我引用了列出的解决方案 here .

这是我执行的:

CREATE TABLE tweetdbq4(hashtag CHAR(50), timestamp CHAR(14), tweetid BIGINT(18) UNSIGNED, userid INT(10) UNSIGNED) ENGINE=MYISAM 
PARTITION BY RANGE COLUMNS(hashtag) (
PARTITION p0 VALUES LESS THAN ('a'),
PARTITION p1 VALUES LESS THAN ('b'),
PARTITION p2 VALUES LESS THAN ('c'),
PARTITION p3 VALUES LESS THAN ('d'),
PARTITION p4 VALUES LESS THAN ('e'),
PARTITION p5 VALUES LESS THAN ('f'),
PARTITION p6 VALUES LESS THAN ('g'),
PARTITION p7 VALUES LESS THAN ('h'),
PARTITION p8 VALUES LESS THAN ('i'),
PARTITION p9 VALUES LESS THAN ('j'),
PARTITION p10 VALUES LESS THAN ('k'),
PARTITION p11 VALUES LESS THAN ('l'),
PARTITION p12 VALUES LESS THAN ('m'),
PARTITION p13 VALUES LESS THAN ('n'),
PARTITION p14 VALUES LESS THAN ('o'),
PARTITION p15 VALUES LESS THAN ('p'),
PARTITION p16 VALUES LESS THAN ('q'),
PARTITION p17 VALUES LESS THAN ('r'),
PARTITION p18 VALUES LESS THAN ('s'),
PARTITION p19 VALUES LESS THAN ('t'),
PARTITION p20 VALUES LESS THAN ('u'),
PARTITION p21 VALUES LESS THAN ('v'),
PARTITION p22 VALUES LESS THAN ('w'),
PARTITION p23 VALUES LESS THAN ('x'),
PARTITION p24 VALUES LESS THAN ('y'),
PARTITION p25 VALUES LESS THAN ('z'),
PARTITION p26 VALUES LESS THAN ('A'),
PARTITION p27 VALUES LESS THAN ('B'),
PARTITION p28 VALUES LESS THAN ('C'),
PARTITION p29 VALUES LESS THAN ('D'),
PARTITION p30 VALUES LESS THAN ('E'),
PARTITION p31 VALUES LESS THAN ('F'),
PARTITION p32 VALUES LESS THAN ('G'),
PARTITION p33 VALUES LESS THAN ('H'),
PARTITION p34 VALUES LESS THAN ('I'),
PARTITION p35 VALUES LESS THAN ('J'),
PARTITION p36 VALUES LESS THAN ('K'),
PARTITION p37 VALUES LESS THAN ('L'),
PARTITION p38 VALUES LESS THAN ('M'),
PARTITION p39 VALUES LESS THAN ('N'),
PARTITION p40 VALUES LESS THAN ('O'),
PARTITION p41 VALUES LESS THAN ('P'),
PARTITION p42 VALUES LESS THAN ('Q'),
PARTITION p43 VALUES LESS THAN ('R'),
PARTITION p44 VALUES LESS THAN ('S'),
PARTITION p45 VALUES LESS THAN ('T'),
PARTITION p46 VALUES LESS THAN ('U'),
PARTITION p47 VALUES LESS THAN ('V'),
PARTITION p48 VALUES LESS THAN ('W'),
PARTITION p49 VALUES LESS THAN ('X'),
PARTITION p50 VALUES LESS THAN ('Y'),
PARTITION p51 VALUES LESS THAN ('Z'),
PARTITION p52 VALUES LESS THAN MAXVALUE
);

我收到这个错误

ERROR 1493 (HY000): VALUES LESS THAN value must be strictly increasing for each partition

通过 PARTITION p0 VALUES LESS THAN ('a') 是否会存储从 0-9 开始的值的分区?

你能告诉我我做错了什么吗?谢谢!

最佳答案

这是因为您使用范围进行分区,您有大写和小写字母。您需要删除一个,因为范围不能使用相同的字符。

关于MYSQL 5.5分区表按第一个字符0-9a-zA-Z,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29368933/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com