V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hellohacker
V2EX  ›  程序员

Mysql: show processlist 命令的一个问题

  •  
  •   hellohacker · 2014-04-26 10:38:12 +08:00 · 2725 次点击
    这是一个创建于 3655 天前的主题,其中的信息可能已经有所发展或是发生改变。
    网站突然访问变慢了很多 使用show processlist 命令 发现

    有一条“DESC tablename" 的info Time 列值为21 state 列的值为”Opening Tables“ ,我在mysql 中执行了命令“DESC tablename" 速度很快,另外检查了表,包括索引、表是否损坏等,都没异常。为什么 这条命令执行时间那么长呢?
    2 条回复    2014-04-28 19:23:13 +08:00
    gfreezy
        1
    gfreezy  
       2014-04-26 23:11:43 +08:00
    不知道原因。推介个percona的工具 pt-query-digest
    hellohacker
        2
    hellohacker  
    OP
       2014-04-28 19:23:13 +08:00
    如果使用kill+进程id号 那么网站访问速度就上去了 能说明是 这个进程出问题了吗,还是说其他的sql语句慢 导致这个进程慢了呢?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3866 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 05:10 · PVG 13:10 · LAX 22:10 · JFK 01:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.