创建索引前,先期删除索引

This commit is contained in:
wangliwen 2022-06-27 15:51:04 +08:00
parent f967285913
commit d5e66e60b5
1 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,14 @@
-- 删除索引
alter table `tb_resource_collection` drop index `resourceid`;
alter table `tb_resource_car` drop index `resourceid`;
alter table `tb_resource_score` drop index `resourceid`;
alter table `tb_resource_browse` drop index `resourceid`;
alter table `t_ability_application` drop index `resourceid`;
alter table `t_ability_application` drop index `userId`;
alter table `tb_data_resource` drop index `type`;
alter table `tb_data_attr` drop index `attr_value`;
alter table `tb_data_resource` drop index `name`;
-- 创建索引
alter table `tb_resource_collection` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '收藏的资源id'; alter table `tb_resource_collection` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '收藏的资源id';
alter table`tb_resource_car` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '加入申购车的id'; alter table`tb_resource_car` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '加入申购车的id';
alter table `tb_resource_score` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '评分的资源id'; alter table `tb_resource_score` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '评分的资源id';