Chinaunix首页 | 论坛 | 博客
  • 博客访问: 489830
  • 博文数量: 99
  • 博客积分: 3621
  • 博客等级: 中校
  • 技术积分: 1089
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-22 16:29
文章存档

2012年(21)

2011年(28)

2010年(50)

分类: Mysql/postgreSQL

2011-07-04 09:49:37

  1. 安装
  2. # wget http://hackmysql.com/scripts/mysqlsla-2.03.tar.gz
  3. # tar zxvf mysqlsla-2.03.tar.gz
  4. # cd mysqlsla-2.03
  5. # perl Makefile.PL
  6. # make
  7. # make install

测试

[root@ldc2095 mysqlsla-2.03]# mysqlsla /var/lib/mysql/ldc2095-slow.log
Auto-detected logs as slow logs
Report for slow logs: /var/lib/mysql/ldc2095-slow.log
6.03k queries total, 238 unique
Sorted by 't_sum'
Grand Totals: Time 944.15k s, Lock 731 s, Rows sent 129.99M, Rows Examined 1.14G
 
 
______________________________________________________________________ 001 ___
Count         : 260  (4.31%)
Time          : 684598.79344 s total, 2633.072282 s avg, 2.767179 s to 6081.362266 s max  (72.51%)
  95% of Time : 605719.49628 s total, 2452.305653 s avg, 2.767179 s to 6045.503342 s max
Lock Time (s) : 211.046 ms total, 812 µs avg, 193 µs to 52.139 ms max  (0.03%)
  95% of Lock : 105.618 ms total, 428 µs avg, 193 µs to 1.866 ms max
Rows sent     : 1.18k avg, 236 to 1.20k max  (0.24%)
Rows examined : 790.89k avg, 4.06k to 810.41k max  (18.10%)
Database      :
Users         :
        dev@ 172.16.215.75 : 100.00% (260) of query, 98.57% (5944) of all users
 
Query abstract:
SET timestamp=N; SELECT /* smw::getqueryresult N.N.N.N */ DISTINCT t0.smw_id AS id,t0.smw_title AS t,t0.smw_namespace AS ns,t0.smw_iw AS iw,t0.smw_sortkey AS sortkey,t0.smw_sortkey FROM smw_ids AS t0 INNER JOIN smw_ids AS t1 ON t0.smw_id=t1.smw_id WHERE t1.smw_namespace='S' ORDER BY t0.smw_sortkey ASC LIMIT N;
 
Query sample:
SET timestamp=1309528970;
SELECT /* SMW::getQueryResult 66.249.71.8 */  DISTINCT t0.smw_id AS id,t0.smw_title AS t,t0.smw_namespace AS ns,t0.smw_iw AS iw,t0.smw_sortkey AS sortkey,t0.smw_sortkey  FROM `smw_ids` AS t0 INNER JOIN `smw_ids` AS t1 ON t0.smw_id=t1.smw_id  WHERE t1.smw_namespace='1180'  ORDER BY t0.smw_sortkey ASC  LIMIT 1201;
 
阅读(792) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~