为什么drop table的时候要在checking permissions花很长时间?
昨天,我drop一个表的时候在checking permissions花了20s+,这个时间花在哪里了呢?经常查找发现我的配置文件innodb_file_per_table=1的,innodb需要遍历LRU链表,并且丢弃属于这个表的表空间里面的页。如果innodb buffer pool很大的话,需要花费很长时间,并且当执行这个动作的时候table_cache的锁是不能被其他query语句持有的。
参考资料:
https://www.percona.com/blog/2011/02/03/performance-problem-with-innodb-and-drop-table/
https://www.percona.com/blog/2011/04/20/drop-table-performance/
为什么drop table的时候要在checking permissions花很长时间?的更多相关文章
- mysql删除大表更快的drop table办法
mysql删除大表更快的drop table办法 参考资料:https://blog.csdn.net/anzhen0429/article/details/76284320 利用硬链接和trunca ...
- MySQL DROP TABLE操作以及 DROP 大表时的注意事项【转】
删表 DROP TABLE Syntax DROP [TEMPORARY] TABLE [IF EXISTS] tbl_name [, tbl_name] ... [RESTRICT | CASCAD ...
- DROP TABLE 恢复【一】
当DROP TABLE指令敲下的时候,你很爽,你有考虑过后果么?如果该表真的没用,你DROP到无所谓,如果还有用的,这时你肯定吓惨了吧,如果你有备份,那么恭喜你,逃过一劫,如果没有备份呢?这时就该绝望 ...
- Drop Table对MySQL的性能影响分析
[问题描述] 最近碰到有台MySQL实例出现了MySQL服务短暂hang死,表现为瞬间的并发线程上升,连接数暴增. 排查Error Log文件中有page_cleaner超时的信息,引起我们的关注: ...
- 利用硬链接和truncate降低drop table对线上环境的影响
众所周知drop table会严重的消耗服务器IO性能,如果被drop的table容量较大,甚至会影响到线上的正常. 首先,我们看一下为什么drop容量大的table会影响线上服务 直接执行drop ...
- Hive drop table batched
if the hive version not support drop table tablename purge. your drop table command will move data t ...
- DROP TABLE ** CASCADE CONSTRAINTS PURGE删除表的时候级联删除从表外键
1.关于 cascade constraints 假设A为主表(既含有某一主键的表),B为从表(即引用了A的主键作为外键). 则当删除A表时,如不特殊说明,则 drop table A 系统会出现错误 ...
- Truncate table、Delete与Drop table的区别
Truncate table.Delete与Drop table的区别 TRUNCATE TABLE 在功能上与不带 WHERE 子句的 DELETE 语句相同:二者均删除表中的全部行.但 TRUNC ...
- Oracle10g 回收站及彻底删除table : drop table xx purge
drop后的表被放在回收站(user_recyclebin)里,而不是直接删除掉.这样,回收站里的表信息就可以被恢复,或彻底清除. 1.通过查询回收站user_recyclebin获取被删除的表信息, ...
随机推荐
- LeetCode Binary Tree Upside Down
原题链接在这里:https://leetcode.com/problems/binary-tree-upside-down/ Given a binary tree where all the rig ...
- UITableView + UISearchBar 实现搜索功能
#import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @pr ...
- InitializingBean afterPropertiesSet
package org.test.InitializingBean; import org.springframework.context.support.ClassPathXmlApplicatio ...
- debug 使用lldb
http://www.zddhub.com/memo/2015/12/20/lldb-golang-debug/ go build -gcflags "-N -l" -o test ...
- iPhone尺寸规范
转载于:http://www.uigreat.com/page/guifan
- 使用已有PDB克隆PDB
使用已有PDB克隆PDB $ sqlplus '/as sysdba' SQL*Plus: Release Production on Tue Jun :: Copyright (c) , , Ora ...
- 理解运算符 || 和 && 及方法
|| 前面为true的话直接返回前面的值,前面为false的话返回后面的值.如下: console.log(0 || 1); console.log(1 || 0); console.log(1 || ...
- 学习jsp(2)
@Webservlet 具体见:http://www.cnblogs.com/luxh/archive/2012/06/06/2537458.html. 我折腾半天才发现,在web.xml里注册了,删 ...
- Swift实战-豆瓣电台(五)播放音乐
观看地址 http://v.youku.com/v_show/id_XNzMwODM0MzI0.html 在这节里面,我们简单学习了一下MediaPlayer的使用 引入媒体框架 import Med ...
- 一个新人对于JavaScript简单应用的理解
JavaScript 1.输出:document.write("hello,world"); document.write的意思就是给我再此页面中显示出什么什么小括号里面的内 ...