說明
1、在MySQL對於join操作的處理過程中,join buffer是一個重要的概念。
2、是MySQL對於table join的一個重要的最佳化手段。雖然這個概念實作並不複雜,但這個是實作MySQL join連線最佳化的一個重要方法,在連線的時候可以大幅提高join查詢的效率。
實例
Table name Type t1 range t2 ref t3 ALL The join is then done as follows: - While rows in t1 matching range - Read through all rows in t2 according to reference key - Store used fields from t1, t2 in cache - If cache is full - Read through all rows in t3 - Compare t3 row against all t1, t2 combinations in cache - If row satisfies join condition, send it to client - Empty cache - Read through all rows in t3 - Compare t3 row against all stored t1, t2 combinations in cache - If row satisfies join condition, send it to client
以上是MySQL中怎麼實作join buffe的詳細內容。更多資訊請關注PHP中文網其他相關文章!