28 lines
1.9 KiB
SQL
28 lines
1.9 KiB
SQL
-- 删除索引
|
|
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_data_resource` drop index `deptId`;
|
|
alter table `sys_dept` drop index `type`;
|
|
alter table `sys_dept` drop index `district`;
|
|
alter table `tb_resource_collection` drop index `userId`;
|
|
-- 创建索引
|
|
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_score` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '评分的资源id';
|
|
alter table `tb_resource_browse` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '资源id索引';
|
|
alter table `t_ability_application` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '资源id';
|
|
alter table `t_ability_application` ADD INDEX `userId`(`user_id`) USING BTREE comment '用户';
|
|
alter table `tb_data_resource` ADD FULLTEXT INDEX `type`(`type`) with parser ngram;
|
|
alter table `tb_data_attr` ADD FULLTEXT INDEX `attr_value`(`attr_value`) with parser ngram;
|
|
alter table `tb_data_resource` ADD FULLTEXT INDEX `name`(`name`) with parser ngram;
|
|
alter table `tb_data_resource` ADD INDEX `deptId`(`dept_id`) USING BTREE;
|
|
alter table `sys_dept` ADD INDEX `type`(`type`) USING BTREE;
|
|
alter table `sys_dept` ADD INDEX `district`(`district`) USING BTREE;
|
|
alter table `tb_resource_collection` ADD INDEX `userId`(`user_id`) USING BTREE; |