MySQL中如何启用join buffer优化?

作者:佚名

时间:2023-04-29 08:52

来源:亿速云

浏览:301

说明1、在MySQL对于join操作的处理过程中,joinbuffer是一个重要的概念。2、是MySQL对于tablejoin的一个重要的优化手段。虽然这个概念实现并不复杂,但是这个是实现MySQLjoin连接优化

golang学习网今天将给大家带来《MySQL中如何启用join buffer优化?》,感兴趣的朋友请继续看下去吧!以下内容将会涉及到等等知识点,如果你是正在学习数据库或者已经是大佬级别了,都非常欢迎也希望大家都能给我建议评论哈~希望能帮助到大家!

说明

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 buffer优化?》的详细内容,更多关于mysql的资料请关注golang学习网公众号!

本文内容来源于互联网,如有侵权请联系删除。

相关文章

更多

热门专题

更多
返回顶部