• mysql-binlog_cache_size


    二进制日志缓冲区吗,默认是32k。该参数是基于会话的,不要设置过大。

    当事务的记录大于设定的binlog_cache_size时,mysql会把缓冲区中的日志信息写入一个临时文件中,所以该值也不能设置过小。

    查看设置

    mysql> show variables like 'binlog_cache_size';
    +-------------------+-------+
    | Variable_name     | Value |
    +-------------------+-------+
    | binlog_cache_size | 32768 |
    +-------------------+-------+
    1 row in set (0.00 sec)
    
    mysql> 
    

    验证binlog_cache_size设置是否合理

    通过查看show global status中的,Binlog_cache_disk_use和Binlog_cache_use

    分析下面的结果,可以看出binlog_cache_size设置低了。

    mysql> show global status like 'binlog_cache_%';
    +-----------------------+-------+
    | Variable_name         | Value |
    +-----------------------+-------+
    | Binlog_cache_disk_use | 1008  | #记录了使用临时文件写二进制日志的次数
    | Binlog_cache_use      | 5721  | #使用缓冲的次数
    +-----------------------+-------+
    2 rows in set (0.00 sec)
    
    mysql>
    
  • 相关阅读:
    flask 知识积累
    python中下划线
    pipenv知识积累
    shell知识积累
    AttributeError: type object 'testClass' has no attribute 'testMothod'
    python知识积累
    补全爬取的url
    linux 的基本命令
    Python里的拷贝
    关于第一次java课的感想
  • 原文地址:https://www.cnblogs.com/abclife/p/5102553.html
Copyright © 2020-2023  润新知