mysql count 優化索引_MySQL學習之SQL優化(索引優化)

在where從句,group by從句,order by從句,on從句中出現的列mysql 索引字段越小越好sql 離散度大的列放到聯合索引的前面數據庫 explain select * from payment where staff_id=2 and customer_id=584;--思考: index(staff_id,customer_id)好?仍是index(customer_id,s
相關文章
相關標籤/搜索