zoukankan      html  css  js  c++  java
  • Mysql Join_buffer_size的使用原理


    1.mysql中的join_buffer_size是定义在

    class JOIN_CACHE(sql_join_buffer.h) 中的 uchar *buff;
    
    void JOIN_CACHE::set_constants() 设置buff的大小
    bool JOIN_CACHE::alloc_buffer() 申请buff大小的内存
    void JOIN_CACHE::free() join操作完成以后,立马释放内存
    void JOIN::destroy() 销毁join类
    
    mysql中每次join操作都会调用my_malloc、my_free函数申请/释放joib_buffer_size的大小的内存。
    join_buffer_size是按照每次操作join表的操作的次数申请和释放joib_buffer_size.
    
    
    (gdb) JOIN_CACHE::set_constants
    Undefined command: "JOIN_CACHE". Try "help".
    (gdb) br JOIN_CACHE::set_constants
    Breakpoint 1 at 0x9a8ac9: file /home/os1/Open/mysql5616/sql/sql_join_buffer.cc, line 432.
    (gdb) br JOIN_CACHE::alloc_buffer
    Breakpoint 2 at 0x9a8cb0: file /home/os1/Open/mysql5616/sql/sql_join_buffer.cc, line 468.
    (gdb) r
    (gdb) br JOIN_CACHE::free 
    (gdb) br JOIN::destroy
  • 相关阅读:
    springboot模板
    springboot入门
    java自定义注解
    git集成idea
    git的搭建和使用
    Shiro授权
    shiro认证
    shiro入门
    springmvc文件上传
    springmvc入门
  • 原文地址:https://www.cnblogs.com/innobase/p/4574968.html
Copyright © 2011-2022 走看看