简体   繁体   中英

Optimizing query in mysql more efficient

Please look at my query and execution plan I have added index in most of the table, but when I am joining it taking primary key and foreign key index. I am taking only 50 records.

it is taking 5-7 seconds.

How can I optimize this more efficient manner.

MIZI

您可以在表boxespo_id中添加索引,也可以将派生表的claim_notes转换为子查询

(SELECT MAX(claim_status_id) FROM claim_notes WHERE item_id = items.id) AS claim_status_id

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM