tmp_table_size
Whenever you increase tmp_table_size and max_heap_table_size, keep in mind that setting these does not make queries behave better. It actually make inefficient queries behave worse than before. Under what circumstances?
When a query performs a join or sort (via ORDER BY) without the benefit of an index, a temp table has to be formed in memory. This would increment Created_tmp_tables.
What if the temp table grows to the number of bytes in tmp_table_size and needs more space? The following sequence of events happens:
- Query processing must stop
- Create a temp table on disk
- Transfer the contents of the memory-based temp table into the disk-based temp table
- Drop in the memory-based temp table
- Query processing continue using the disk-based temp table
This process increments Created_tmp_disk_tables
Knowing these mechanisms, let's explore what happened in each instance
disk tables decreased from 27.37% to 21.70% -> expected much more
This could easily happen if the queries that ran before have cached results remaining in RAM. This would eliminate the need to process the query from the beginning and not recreate the same large temp tables.
temporary files rise form 1.16% to 33.75% -> why ?
This is not surprising. This simply brings out the fact that there are queries that require temp tables. They were created in RAM first. This just indicates the presence of queries that do not join well (maybe join_buffer_size is too small) or ORDER BY non-indexed columns or columns with a temp table (maybe sort_buffer_size is too small).
memory tables decreased from 71.48% to 44.55% -> strange; expected to rise
This is not surprising either. If there are enough calls for the same query with the same values, sorts and joins may be preempted by the fulfillment of queries from previously cached results.
RECOMMENDATION
tmp_table_size的更多相关文章
- mysql 参数:[read_buffer_size] [sort_buffer_size] [read_rnd_buffer_size] [tmp_table_size]---图解
http://imysql.cn/2008_09_27_deep_into_mysql_sort_buffer http://my.oschina.net/realfighter/blog/36442 ...
- MYSQL增加tmp_table_size 的操作
最近有张表经常损坏,修复后还是会出现损坏. dba分析有可能是临时表空间太小导致的.以下是设置临时表空间大小的操作. 设置 tmp_table_size的大小 mysql> set global ...
- mysql - tmp_table_size & max_heap_table_size
Command-Line Format --tmp_table_size=# System Variable Name tmp_table_size Variable Scope Global, Se ...
- tmp_table_size ---> 优化 MYSQL 经验总结
数据库连接突然增多到1000的问题 查看了一下,未有LOCK操作语句. 但是明显有好多copy to tmp table的SQL语句,这条语读的时间比较长,且这个表会被加读锁,相关表的update语句 ...
- [原] KVM 环境下MySQL性能对比
KVM 环境下MySQL性能对比 标签(空格分隔): Cloud2.0 [TOC] 测试目的 对比MySQL在物理机和KVM环境下性能情况 压测标准 压测遵循单一变量原则,所有的对比都是只改变一个变量 ...
- 在 Windows7 上按照 MySQL5.7
在 Windows7 上按照 MySQL5.7 1.从官网下载最新版本的 MySQL,这里下载的是 mysql-5.7.17-win32: 2.将下载的 mysql-5.7.17-win32.zip ...
- Mysql 中 show full processlist
processlist命令的输出结果显示了有哪些线程在运行,可以帮助识别出有问题的查询语句,两种方式使用这个命令. 1. 进入MySQL/bin目录下输入mysqladmin processlist; ...
- MySQL多实例安装
1.安装MySQL需要的依赖的包和编译软件 (1)安装MySQL需要的依赖包 安装MySQL之前,最好先安装MySQL需要的依赖包,不然后面会出现报错,还得回来安装MySQL的依赖包. [root ...
- MYSQL数据库的优化
我们究竟应该如何对MySQL数据库进行优化?下面我就从MySQL对硬件的选择.MySQL的安装.my.cnf的优化.MySQL如何进行架构设计及数据切分等方面来说明这个问题. 服务器物理硬件的优化 在 ...
随机推荐
- Linux-Big-Endian和Little-Endian转换
转自:http://blog.csdn.net/aklixiaoyao/article/details/7548860 在各种计算机体系结构中,对于字节.字等的存储机制有所不同,因而引发了计算机通信领 ...
- sql float 转换为 nvarchar
INSERT INTO CC11 SELECT convert(nvarchar(30),convert(decimal(11,0),PCTID)),convert(nvarchar(30),conv ...
- dom自定义属性 兼容 index值获取
function getIndex(Eve,obj){ for(var i = 0;i<obj.length;i++){ obj[i].setAttribute("index" ...
- [安卓]windows下如何安装Android源码
本文改写于:http://www.cnblogs.com/skyme/archive/2011/05/14/2046040.html 1.下载并安装git: 在git-scm.com上下载并安装git ...
- Python的平凡之路(11)
一. rabbitmq 1 进程Queue: 父进程与子进程进行交互,或者同属于同一父进程下多个子进程进行交互 2 队列通信: send1.py #!/usr/bin/env python#Au ...
- 《C++primer》v5 第3章 字符串、向量和数组 读书笔记 习题答案
本章问题 1.char *p="hello world";与char p[]="hello world"的问题. 简单说前者是一个指向字符串常量的指针,后者是一 ...
- Java EE注册三部曲(一步曲)
一步曲(html+servlet+SQL+Bean+Dao+加密(Base64)) 设计思路: 1:编写前台页面jsp:register.jsp,使得用户能够实行注册操作 2:编写servlet:re ...
- CSS中相对定位与绝对定位
看了几个讲解定位的博客,觉得还不错,分享之: 博客一:http://blog.sina.com.cn/s/blog_4bcf4a5e010008o0.html 文章中,主要需要参考的有两点: 1,相对 ...
- 团队开发——冲刺1.c
冲刺阶段一(第三天) 1.昨天做了什么? 在C#的Windows窗体应用程序中,设计简单的游戏界面. 2.今天准备做什么? 首先把昨天遇到的问题解决了,虽然没有找到原因,但是只要每一步修改后就立即运行 ...
- Python::OS 模块 -- 简介
OS 模块简介 OS模块是Python标准库中的一个用于访问操作系统功能的模块,OS模块提供了一种可移植的方法使用操作系统的功能.使用OS模块中提供的接口,可以实现跨平台访问.但是在OS模块中的接口并 ...