MySql數據庫優化(3)

MySQL索引優化 如何選擇何使的列建立索引 在where從句,group by 從句,order by 從句,on從句中出現的列 索引字段越小越好 離散度大的列放到聯合索引的前面 問個問題:selet  * from payment where staff_id=2 and customer_id=584; 這條語句中,是index(sftaff_id,customer_id)好還是(custo
相關文章
相關標籤/搜索