首頁  >  文章  >  資料庫  >  select-mysql语句查询时间过长如何优化?

select-mysql语句查询时间过长如何优化?

WBOY
WBOY原創
2016-06-06 09:37:111362瀏覽

selectmysql数据sql优化

SELECT t1.id, t1.order_no, t1.order_status, t1.pay_status,t1.shipping_status,
t1.pay_method, t1.invoice, t1.remark, t1.seller, t1.buyer, t1.site_id, t1.order_time, t1.pay_time,
t1.sign_for_time, t1.delivery_time, t1.subtotal, t1.freight, t1.invitation, t1.cope, t1.is_comment,t1.pay_discount FROM zcwl_order t1 LEFT JOIN
zcwl_order_shipping_address t2 ON t2.order_id = t1.id
WHERE t1.site_id ORDER BY t1.order_time DESC

<code>这条sql语句需要查14秒 如何缩短时间?ps:大概有1W条数据</code>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn