mysql 添加索引跟查看索引
-- 查看索引 show index from server_networkport_relation; show index from server_ipmi_relation; show index from server_hardware_config; show index from device_intranet_ip_relation; show index from device_ip_relation; show index from device_ipmi_ip_relation; -- 设置索引 ALTER TABLE `server_networkport_relation` ADD INDEX (`server_id`) USING BTREE ; ALTER TABLE `server_ipmi_relation` ADD INDEX (`server_id`) USING BTREE ; ALTER TABLE `server_hardware_config` ADD INDEX (`server_id`) USING BTREE ; ALTER TABLE `device_intranet_ip_relation` ADD INDEX (`device_connect_id`) USING BTREE ; ALTER TABLE `device_ip_relation` ADD INDEX (`device_connect_id`) USING BTREE ; ALTER TABLE `device_ipmi_ip_relation` ADD INDEX (`device_connect_id`) USING BTREE ;