zoukankan      html  css  js  c++  java
  • mysql基本信息收集

    1、下载安装 percona-toolkit 工具包
    http://www.percona.com/downloads/percona-toolkit/LATEST/tarball/

    2、运行下面两个工具,结果拷屏
    pt-summary
    pt-mysql-summary --socket=path_to_mysql_socket_dir/mysql.sock

    ---mysql> select count(*) as cnt,table_schema,engine from information_schema.tables where table_schema not in('mysql','information_schema','PERFORMANCE_SCHEMA') group by table_schema,engine order by cnt desc;
    3、查看MySQL中,都使用了哪些引擎
    mysql> select table_schema,table_name,engine,TABLE_ROWS,AVG_ROW_LENGTH,DATA_LENGTH,INDEX_LENGTH from information_schema.tables where table_schema not in('mysql','information_schema','PERFORMANCE_SCHEMA') order by table_schema,TABLE_ROWS desc;
    如果mysql版本较低,可在业务数据库下执行show table status;

    4、业务高峰期时,在操作系统上执行vmstat -S m 3 100(或者vmstat 3 100)的结果

    5、查看线程状态
    mysql> show processlist;

    6、如果第5步有不少SQL经常能看到,把那些SQL的执行计划也收集下,以及相应表的DDL
    mysql> explain select....
    mysql> show create table table_name;
    mysql> show index from table_name;

    7、提供慢日志统计结果
    mysqldumpslow slow.log > slow-stat.log
    slow.log文件名改成你真正的慢日志文件名

  • 相关阅读:
    JSON数据格式
    AJAX入门
    SpringMVC如何处理JSON数据和运行流程
    SpringMVC视图解析器与数据类型转换
    SpringMVC入门——基础知识
    SpringMVC自定义拦截器与异常处理
    SpringMVC实现文件的上传和下载
    Eclipse中安装Springtools插件的步骤
    SpringMVC实现员工信息的增删改查
    文件的上传与下载
  • 原文地址:https://www.cnblogs.com/wlmq/p/6096479.html
Copyright © 2011-2022 走看看