以下Explain_Plan图
究竟发生了什么第一次加入两张桌子产品& Order_Items然后输出与订单连接,然后与Customers.Am加入我对吗?如果没有请解释我,非常感谢。
编辑:查询也是:
SELECT c.name,
oi.amount,
oi.quantity,
p.name
FROM customers c
JOIN orders o
ON c.id = o.customer_id
JOIN order_items oi
ON o.id = oi.order_id
JOIN products p
ON oi.product_id = p.identifier
WHERE p.name LIKE '%DVD%'
AND oi.order_date BETWEEN '1/1/2000' AND '31/12/2000'
AND o.channel = 'Internet'
ORDER BY c.name;