• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > MySQL线程处于Waiting for table flush的分析

MySQL线程处于Waiting for table flush的分析

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-05

匿名通过本文主要向大家介绍了Waiting,MySQL,table等相关知识,希望本文的分享对您有所帮助

最近遇到一个案例,很多查询被阻塞没有返回结果,使用show processlist查看,发现不少MySQL线程处于Waiting for table flush状态,查询语句一直被阻塞,只能通过Kill进程来解决。那么我们先来看看Waiting for table flush的官方解释:https://dev.mysql.com/doc/refman/5.6/en/general-thread-states.html

Waiting for table flush

The thread is executing FLUSH TABLES and is waiting for all threads to close their tables, or the thread got a notification that the underlying structure for a table has changed and it needs to reopen the table to get the new structure. However, to reopen the table, it must wait until all other threads have closed the table in question.

This notification takes place if another thread has used FLUSH TABLES or one of the following statements on the table in question: FLUSH TABLES tbl_name, ALTER TABLE, RENAME TABLE, REPAIR TABLE, ANALYZE TABLE, or OPTIMIZE TABLE.

那么我们接下来模拟一下线程处于Waiting for table flush状态的情况,如所示:

在第一个会话连接(connection id=13)中,我们使用lock table 锁定表test。

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • MySQL线程处于Waiting for table flush的分析

相关文章

  • 2018-12-05MySQL大数据查询性能优化教程(图)
  • 2018-12-05MySQL服务在Windows下无法停止和删除的解决办法详解
  • 2018-12-05Window下Mysql忘记root密码怎么重置的图文详细介绍
  • 2018-12-05Oracle 10g大表批量更新优化
  • 2018-12-05MySQL锁机制和PHP锁机制
  • 2018-12-05SQL Server 排序函数 ROW_NUMBER和RANK 用法总结
  • 2018-12-05详细介绍Win2008 R2 mysql5.5zip格式mysql安装与配置的图文代码分享
  • 2018-12-05MySQL二进制日志相关问题详解
  • 2018-12-05SQL Server 任务监控脚本
  • 2018-12-05MySQL中表分区的详细介绍

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • SqlServer2005 数据库同步配置图文详解
    • 基于ubuntu中使用mysql实现opensips用户认证的解决方法
    • MySQL什么是物理备份(lvm-snapshot)
    • 批量执行sql语句的方法
    • 深入解析Linux下MySQL数据库的备份与还原
    • Oracle 9i产品文档
    • mysql误删root用户恢复方法
    • MySQL服务器默认安装之后调节性能的方法
    • sqlserver 查询数据库大小的方法
    • Mysql的备份和恢复

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有