EXPLAIN PARTITIONS SELECT
*
FROM
delivery_warning_detail_unload AS u
LEFT JOIN delivery_warning_detail_handover AS h ON u.main_waybill_no = h.main_waybill_no
LEFT JOIN delivery_warning_detail_send AS s ON u.main_waybill_no = s.main_waybill_no
WHERE arrival_network_date >= '2018-11-20'
AND arrival_network_date <= '2018-12-2'
ORDER BY
arrival_network_date DESC
LIMIT 0,
10
explain 分析sql的执行计划,partitions 分析sql分区情况。
这个三个表左连接,on条件必须加上索引