select r.trx_id waiting_trx_id, r.trx_mysql_thread_Id waiting_thread,

       r.trx_query waiting_query, b.trx_id blocking_trx_id,
       b.trx_mysql_thread_id blocking_thread, b.trx_query blocking_query
  from information_schema.innodb_lock_waits w inner join information_schema.innodb_trx b on b.trx_id = w.blocking_trx_id
  inner join information_schema.innodb_trx r on r.trx_id = w.requesting_trx_id;

【转载】MySQL查询阻塞语句的更多相关文章

  1. Mysql自带查询阻塞语句

    select r.trx_id waiting_trx_id, r.trx_mysql_thread_Id waiting_thread, r.trx_query waiting_query, b.t ...

  2. Mysql查询阻塞初探

    第一次值班,报警打电话给我说,数据库复制延时一个多小时,那个时候是半夜啊,但我还是很清醒的起来,开机.vpn.登录.show processlist,结果发现情况是这样的: 红线框表示的是当前每个线程 ...

  3. mysql 查询select语句汇总

    数据准备: 创建表: create table students( id int unsigned primary key auto_increment not null, name varchar( ...

  4. Mysql 查询阻塞和事物情况

    MYSQL 服务器逻辑架构图 连接/线程处理 == > (解析器 –> 查询缓存) ===> 优化器 ===> 存储引擎 服务器级别锁MYSQL 使用的锁类型:表锁(显式:LO ...

  5. Mysql查询阻塞的sql

    SELECTp2.`HOST` 被阻塞方host,p2.`USER` 被阻塞方用户,r.trx_id 被阻塞方事务id,r.trx_mysql_thread_id 被阻塞方线程号,TIMESTAMPD ...

  6. mysql 查询死锁语句

    我们可以用下面三张表来查原因:        innodb_trx ## 当前运行的所有事务        innodb_locks ## 当前出现的锁        innodb_lock_wait ...

  7. MySQL查询去重语句

    1.distinct select count(distinct CName) from Course select count(CName) from (select distinct CName ...

  8. MySQL查询语句执行过程及性能优化(JOIN/ORDER BY)-图

    http://blog.csdn.net/iefreer/article/details/12622097 MySQL查询语句执行过程及性能优化-查询过程及优化方法(JOIN/ORDER BY) 标签 ...

  9. MySQL查询不使用索引汇总 + 如何优化sql语句

    不使用索引原文 : http://itlab.idcquan.com/linux/MYSQL/918330.html MySQL查询不使用索引汇总 众所周知,增加索引是提高查询速度的有效途径,但是很多 ...

随机推荐

  1. 【AR】Vuforia App key is missing.Please get a valid key

    在跑Vuforia 的sample android app 的时候报了下面这个错,找了半天才找到解决方法: "Vuforia App key is missing. Please get a ...

  2. 一路踩过的坑 php

    1.数据表唯一索引  (两列字段,组合索引) 遇到的情形:项目搭建新测试环境(其实就是所谓的灰度 与线上一致的一个环境):从线上拉回来代码搭建的,数据也是来自于线上数据,但是由于线上数据有部分为机密数 ...

  3. # 基于Gitolite搭建Git Server - 支持SSH&HTTP

    Git, 一个分布式的版本管理工具,我认为其革命性的点:在于改变了用户协作的方式,使得协作更简单. 下面讲述 使用一个开源软件 Gitolite搭建一个Git Sever, 并给了一个推荐的团队协助方 ...

  4. Linq To Csv 实例简说

    http://www.codeproject.com/Articles/25133/LINQ-to-CSV-library 详细源代码在这里 https://github.com/mperdeck/L ...

  5. PHP动态函数

    header('Content-type:text/html;Charset=utf8'); function welcome(){ echo 'Welcome to you.'; } functio ...

  6. 为IE单独写CSS的三种方法

    本文由 Kayo Lee 发表,本文链接:http://kayosite.com/the-methods-make-css-only-for-ie.html 因为万恶的 IE 存在各种的不标准,因此, ...

  7. 页面table的每行都有一个<input type='button' />,如何实现点击按钮在按钮下方弹出一个div,点击空白消失

    \ <input id="test" type="button" />/*按钮*/ <div id="tanchu"> ...

  8. jQuery自定义Web页面鼠标右键菜单

    jQuery自定义Web页面鼠标右键菜单 右键菜单是固定的,很多时候,我们需要自定义web页面自定义菜单,指定相应的功能. 自定义的原理是:jQuery封装了鼠标右键的点击事件(“contextmen ...

  9. ajax请求简写

    <script type="text/javascript"> function changle() { $.post( "SendMail", / ...

  10. c 语言时间的输出和比较

    time_t The most basic representation of a date and time is the type time_t. The value of a time_t va ...