问题描述
每次启动,都自动删除索引创建索引,如果数据大了启动会卡死
Hibernate: alter table cent_subject_rate drop index UKq0bb2hiln5dlv7pxtx998d2ec
Hibernate: alter table cent_subject_rate add constraint UKq0bb2hiln5dlv7pxtx998d2ec unique (subject)
Hibernate: alter table resource drop index UKofk8xvjky9ywulks6j96gieec
Hibernate: alter table resource add constraint UKofk8xvjky9ywulks6j96gieec unique (url, method)
Hibernate: alter table sms_phone_numbers_validate_daily_statistic drop index UK4oek3chy167t2u1j8xcrywqne
Hibernate: alter table sms_phone_numbers_validate_daily_statistic add constraint UK4oek3chy167t2u1j8xcrywqne unique (day, phone_numbers)
Hibernate: alter table user_message_format drop index UKdnx02we4jsxakvd4yy8xv4tw0
Hibernate: alter table user_message_format add constraint UKdnx02we4jsxakvd4yy8xv4tw0 unique (name)
排查问题

各种查询之后发现
MySQL索引varchar长度问题(不能超过255)
特别是在UTF8 下面长度更低。
更刺激的是,阿里云的RDS 最大长度只能是 767 byte 也就 100 来个 varchat 长度
网友评论