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 环境变量配置
			
linux 环境,用户通过shell 操作时,系统会为用户初使化环境变量, 比如系统公共资源路径: path , include , bin 等目录. shell 模式下,执行 export , 查看 ...
 - powershell玩转sqlite数据库
			
脚本经常需要处理文本,有时候是行列整齐文本.那么powershell脚本处理行列文本有几种方法呢?一种是excel,另外的一些是?access?sqlite? sqlite是一个很小巧的,很方便嵌入到 ...
 - 数据库学习(-)--sqlserver数据类型
			
第一大类:整数数据 bit:bit数据类型代表0,1或NULL,就是表示true,false.占用1byte.int:以4个字节来存储正负数.可存储范围为:-2^31至2^31-1.smallint: ...
 - Warning: Attempt to dismiss from view controller <UIViewController: 0x17d71c10> while a presentation or dismiss is in progress!
			
昨天 调试程序 已经快要上线了 突然有个BUG 找了半天 才找到是因为这个警告 但是 解决这个警告又花了一天的时间 试了各种消除控制器的方法 都不可用 其中 并且 有这个bug 手机真机测试完全没问 ...
 - C#代码示例_函数
			
参数数组 C#允许为函数指定一个(只能指定一个)特定的参数,这个参数必须是函数定义中的最后一个参数,称为参数数组.参数数组可以使用个数不定的参数调用函数,可以使用params关键字定义它们. 参数数组 ...
 - lsof 解决无法删除文件夹问题
			
今天在HPCC上面想要删除一个文件夹,结果说“Device or resource busy". 于是google一下,发现这个是因为有程序正在运行,所以无法删除. 那么怎样解决? lso ...
 - 百度翻译&&金山词霸API
			
#/usr/bin/env python3 #coding=utf8 """百度翻译api功能实现函数,本模块基于Python3.x实现,getTransResult(q ...
 - 虚拟机VMBox的空间扩展和对加载进来资源的扩展
			
来源于:http://www.linuxidc.com/Linux/2015-01/111186.htm 其中有点bug就自己重新复制黏贴下 VirtualBox虚拟机在使用的过程中,有时会遇到磁盘大 ...
 - 公钥与私钥,HTTPS详解
			
1.公钥与私钥原理1)鲍勃有两把钥匙,一把是公钥,另一把是私钥2)鲍勃把公钥送给他的朋友们----帕蒂.道格.苏珊----每人一把.3)苏珊要给鲍勃写一封保密的信.她写完后用鲍勃的公钥加密,就可以达到 ...
 - 使用MVC和EF,在保存数据的时候报错:System.Data.Entity.Validation.DbEntityValidationException: 对一个或多个实体的验证失败。有关详细信息,请参阅“EntityValidationErrors”属性。
			
public UserInfo Create(UserInfo entity) { try { context.UserInfoes.Add(entity); context.SaveChanges( ...