Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1890616
  • 博文数量: 389
  • 博客积分: 7877
  • 博客等级: 少将
  • 技术积分: 4521
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-10 14:02
文章分类

全部博文(389)

文章存档

2024年(1)

2022年(1)

2021年(1)

2020年(1)

2019年(1)

2018年(3)

2017年(6)

2016年(4)

2015年(8)

2014年(15)

2013年(31)

2012年(19)

2011年(47)

2010年(33)

2009年(105)

2008年(109)

2007年(4)

分类:

2010-08-31 13:53:35

db2 get monitor switches
查看snapshot的各个开关,将这些开关都打开,

db2 update monitor switches using BUFFERPOOL ON
db2 update monitor switches using LOCK ON
db2 update monitor switches using SORT ON
db2 update monitor switches using STATEMENT ON
db2 update monitor switches using TABLE ON
db2 update monitor switches using TIMESTAMP ON
db2 update monitor switches using UOW ON

执行下面的命令抓取dynamic sql的信息
db2 get snapshot for dynamic sql on orsdb > dynamic.out

cat dynamic.out|grep 'Total execution time' > time.out

cat time.out|sort -n +5
最下面的即为消耗时间最多的dynamic sql, 但是还需要看该sql的执行次数,这样可以计算出执行一次这样的sql语句需要
多长时间,找到消耗时间最多的sql语句,看能否做一些优化及调整,
阅读(5888) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-03 15:46:52

Download More than 1000 free IT eBooks: http://free-ebooks.appspot.com