insert 执行耗时太长 —— 没用的索引太多了,写数据的同时,还要写index #291
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
清空记录数,果断时间再继续看
insert into opm_mw_raw_data(organ_id,device_id,type,code,url,link,created_at,depart) values('140','2730','0000','MssOrange','c=api&a=MssOrange&hosp=11314042730&time=20251223165115&code=314273050165045346%20A&type=01&weig=6500&info=9679121-314273050166045345%20A-8-34100&depa=t9190000113395&hand=r160114448&rece=r170011748&acts=0000','收集','2025-12-23 16:51:15','');
TRUNCATE TABLE performance_schema.table_io_waits_summary_by_index_usage;
SELECT OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME, COUNT_FETCH, COUNT_INSERT, COUNT_UPDATE, COUNT_DELETE
FROM performance_schema.table_io_waits_summary_by_index_usage
WHERE OBJECT_SCHEMA = 'opm_mw_medical_waste' and (OBJECT_NAME='opm_mw_info_data' or OBJECT_NAME='opm_mw_raw_data')
order by OBJECT_NAME,COUNT_FETCH DESC;
查看哪些索引没用过,然后把这些索引删除掉
像是没有用的索引