zoukankan      html  css  js  c++  java
  • mysql 表日常变化前几


    mysql 表日常变化前几
    use performance_schema
    create table test.snap1 as SELECT OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, SUM_TIMER_WAIT, COUNT_READ, SUM_TIMER_READ, COUNT_WRITE, SUM_TIMER_WRITE, COUNT_FETCH, SUM_TIMER_FETCH, COUNT_INSERT, SUM_TIMER_INSERT, COUNT_UPDATE, SUM_TIMER_UPDATE, COUNT_DELETE, SUM_TIMER_DELETE FROM table_io_waits_summary_by_table ;

    create table test.snap2 as SELECT OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, SUM_TIMER_WAIT, COUNT_READ, SUM_TIMER_READ, COUNT_WRITE, SUM_TIMER_WRITE, COUNT_FETCH, SUM_TIMER_FETCH, COUNT_INSERT, SUM_TIMER_INSERT, COUNT_UPDATE, SUM_TIMER_UPDATE, COUNT_DELETE, SUM_TIMER_DELETE FROM table_io_waits_summary_by_table ;

    select a.OBJECT_NAME,a.COUNT_WRITE-b.COUNT_WRITE from test.snap1 b, test.snap2 a where a.OBJECT_SCHEMA=b.OBJECT_SCHEMA and a.OBJECT_NAME=b.OBJECT_NAME order by a.COUNT_WRITE-b.COUNT_WRITE desc;

  • 相关阅读:
    又过了一周
    本周学习情况
    5.12
    一周回顾
    npm修改全局包安装路径
    热力图之heatmap
    前端的发展历程
    idea打开maven项目没有别识别是maven项目
    nginx下部署vue项目
    WEB前端开发NodeJS
  • 原文地址:https://www.cnblogs.com/hllnj2008/p/5062783.html
Copyright © 2011-2022 走看看