Code Monkey home page Code Monkey logo

mysqlprofilingtree's Introduction

MysqlProfilingTree

Mysql慢查询,性能瓶颈问题研究

     当我们要对某一条sql的性能进行分析时,可以使用它。

     Profiling是从 mysql5.0.3版本以后才开放的。
     启动profile之后,所有查询包括错误的语句都会记录在内。
     关闭会话或者set profiling=0 就关闭了。(如果将profiling_history_size参数设置为0,
     同样具有关闭MySQL的profiling效果。)

     此工具可用来查询SQL执行状态,System lock和Table lock 花多少时间等等,

     对定位一条语句的I/O消耗和CPU消耗 非常重要。(SQL 语句执行所消耗的最大两部分资源就是IO和CPU)
查询profile是否打开
SELECT @@profiling;

       1)输出0说明profiles功能是关闭的
         开启profiles功能
         > set profiling=1;

       2)show profiles;

       3)show profile all for query 66;

mysqlprofilingtree's People

Contributors

qiuqiuxiaomaomi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.