zoukankan      html  css  js  c++  java
  • Mariadb 解决 The total number of locks exceeds the lock table size

    进行一个很大数据量的insert 语句,执行了大概10分钟左右报错 The total number of locks exceeds the lock table size ;删除的话也会报错。

    InnoDB Buffer Pool

    The XtraDB/InnoDB buffer pool is a key component for optimizing MariaDB. It stores data and indexes, and you usually want it as large as possible so as to keep as much of the data and indexes in memory, reducing disk IO, as main bottleneck.
    https://mariadb.com/kb/en/innodb-buffer-pool/

    innodb_buffer_pool_size

    The most important server system variable is innodb_buffer_pool_size, which you can set from 70-80% of the total available memory on a dedicated database server with only or primarily XtraDB/InnoDB tables.
    Be aware that the total memory allocated is about 10% more than the specified size as extra space is also reserved for control structures and buffers. The space must also be contiguous. If you're running a Windows system that loads DLL's at specific addresses, this may cause difficulties.
    The larger the size, the longer it will take to initialize. On a modern 64-bit server with a 10GB memory pool, this can take five seconds or more.
    Make sure that the size is not too large, causing swapping. The benefit of a larger buffer pool size is more than undone if your operating system is regularly swapping.
    Since MariaDB 10.2.2, the buffer pool can be set dynamically, and new variables are introduced that may affect the size and performance. See Setting Innodb Buffer Pool Size Dynamically.

    由于我得mariadb 版本是10.0 的,所以只能重启修改参数。

    [Mariadb]
    innodb_buffer_pool_size=8G

  • 相关阅读:
    同步和异步有何异同,在什么情况下分别使用他们?
    Android 缓存处理
    Android常用的设计模式概念
    Android常见的设计模式详解
    Android中的五大布局
    几种常见的引用概念
    面向对象的思想概述
    Android系统架构的简单描述
    display:none;与visibility:hidden;的区别
    块级元素和行内元素的区别
  • 原文地址:https://www.cnblogs.com/Leo-Cjh/p/13729009.html
Copyright © 2011-2022 走看看