https://dev.mysql.com/doc/internals/en/memory-allocation-mysql-server.html

MySQL Internals Manual  /  Memory Allocation  /  Memory Allocation in the MySQL Server (sql Directory)

9.1 Memory Allocation in the MySQL Server (sql Directory)

The basic logic to use:

All things that are used only for the duration of a query are allocated in THD::mem_root through sql_alloc() or thd->alloc() except:

  • Things that may grow, like string buffers of type String. See sql/sql_string.cc.

  • Large blocks of memory used in one state of the query that can be released early. These are things like sort buffers, range trees, etc.

  • Things in libraries that are outside of MySQL's control (like hash tables).

Things that are needed a longer time should be alllocated with my_malloc() or through another MEMROOT.

Memory Allocation in the MySQL Server的更多相关文章

  1. MySQL Server and Server-Startup Programs

    1. mysqld-The MySQL Server mysqld,also known as mysql server, is the main program that does most of ...

  2. Memory Allocation Error

    Memory allocation error happened when I tried to install MySQL 5.7.13 in my server, which has 2G mem ...

  3. linux 下tomcat出现 Native memory allocation (malloc) failed to allocate 1915224064 bytes for committing reserved memory问题

    ## There is insufficient memory for the Java Runtime Environment to continue.# Native memory allocat ...

  4. Linux下TomcatVM参数修改:Native memory allocation (mmap) failed to map 3221225472 bytes for committing reserved memory.

    不可行的方法最初我直接修改catalina.sh, 将JAVA_OPTS变量加上了 -server -Xms1G -Xmx1G -XX:+UserG1GC最初看起来没啥问题,但是当服务器运行几天后,发 ...

  5. MySQL Server类型之MySQL客户端工具的下载、安装和使用

    本博文的主要内容有 .MySQL Server 5.5系列的下载 .MySQL Server 5.5系列的安装 .MySQL Server 5.5系列的使用 .MySQL Server 5.5系列的卸 ...

  6. 第6章 影响 MySQL Server 性能的相关因素

    前言: 大部分人都一致认为一个数据库应用系统(这里的数据库应用系统概指所有使用数据库的系统)的性能瓶颈最容易出现在数据的操作方面,而数据库应用系统的大部分数据操作都是通过数据库管理软件所提供的相关接口 ...

  7. 影响 MySQL Server 性能的相关因素

    MySQL 最多的使用场景是WEB 应用,那么我们就以一个WEB 应用系统为例,逐个分析其系统构成,进行经验总结,分析出数据库应用系统中各个环境对性能的影响. 商业需求对性能的影响 这里我们就拿一个看 ...

  8. 配置percona mysql server 5.7基于gtid主主复制架构

    配置mysql基于gtid主主复制架构 环境: 操作系统 centos7. x86_64 mysql版本:Percona-Server-- 测试环境: node1 10.11.0.210 node2 ...

  9. MySQL mysql server与存储引擎

    mysql server系统架构 逻辑模块组成: mysql逻辑模块可以分为两层架构,第一层是sql layer主要包括权限判断.sql解析.执行计划优化.query cache的处理等:第二层是存储 ...

随机推荐

  1. Xamarin.Android开发实践(十八)

    Xamarin.Android之SlidingMenu 一.前言 有位网友在评论中希望能够出个在Xamarin.Android下实现SlidingMenu效果的随笔,刚好昨天在观看官网示例项目的时候也 ...

  2. C++学习网站总结(转)

    总结帖: http://club.topsage.com/thread-361504-1-1.html Visual C++ (VC) / MFC 电子书下载: Visual C++ 2008 入门经 ...

  3. Servlet跳转方式

    servlet之间的跳转,有两种方式: 1.redirect方式,是新的请求,数据不相同 2.forward方式是同一个请求,数据相同

  4. flume与Mosquitto的集成

    文章来自:http://www.cnblogs.com/hark0623/p/4173714.html   转发请注明 因业务需求,需要flume收集MQTT(Mosquitto)的数据.  方法就是 ...

  5. 克隆或拷贝的VMware虚拟机IP问题解决

    克隆的虚拟机或是将虚拟机通过快照回到过去某个状态后,会上不了网. 如果不想看细节,可直接跳到小结部分. 问题描述: 运行service network restart时 Device eth0 doe ...

  6. SGU326 Perspective(指派问题)

    题目简单吧,如果知道题目要干嘛的话. 每个比赛指定A赢或者B赢使它们赢得次数不超过1赢得次数.建立一个二分图模型,X部比赛,Y部队伍,用最大流求解,如果最后最大流等于比赛场数就有解. 然而我还是掉坑里 ...

  7. 十位一线专家分享Spark现状与未来----峰会摘录

    CSDN大数据技术: 十位一线专家分享Spark现状与未来(一) 十位一线专家分享Spark现状与未来(二) 十位一线专家分享Spark现状与未来(三) 部分摘录: 加州大学伯克利分校AMP实验室博士 ...

  8. javascript第三弹——数组

    什么是数组 数组是值的有序集合.每个值叫做元素,每个元素在数组中都有数字位置编号,也就是索引.JS中的数组是弱类型的,数组中可以含有不同类型的元素.数组元素甚至可以是对象或其它数组.数组的长度是动态的 ...

  9. Shell 之数组 [转]

    本文也即<Learning the bash Shell>3rd Edition的第六章Command-Line Options and Typed varilables之读书笔记之三,但 ...

  10. CentOS 下用的是lnmp 的包配置Nginx 下的CI伪静态(搞爽了)

    server { listen ; server_name cy.com; index index.html index.htm index.php default.html default.htm ...