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
  • 相关阅读:
    RPC的入门
    Https的实现原理
    Celery
    Flask信号
    Redis安装
    python之递归
    python之三元表达式和生成式
    python第十八天作业
    python之生成器
    python之迭代器
  • 原文地址:https://www.cnblogs.com/innobase/p/4574968.html
Copyright © 2011-2022 走看看