IT咨询服务Db2数据库sql优化

DB2 SQL语句时间都花在哪个环节?

快照时间是:9:40分其中APP中的语句信息如下:Statement type                             = Dynamic SQL StatementStatement        &nbs...显示全部
快照时间是:9:40分
其中APP中的语句信息如下:
Statement type                             = Dynamic SQL Statement
Statement                                  = Fetch
Section number                             = 1
Application creator                        = NULLID
Package name                               = SYSSN100
Consistency Token                          =
Package Version ID                         =
Cursor name                                = SQL_CURSN100C1
Statement database partition number        = 0
Statement start timestamp                  = 03/02/2015 09:09:09.923204  【注意这里,快照时间是9:40】
Statement stop timestamp                   =
Elapsed time of last completed stmt(sec.ms)= 0.000022
Total Statement user CPU time              = 25.329957   【注意这里,为什么这个时间这么小?】
Total Statement system CPU time            = 0.000000
SQL compiler cost estimate in timerons     = 849507   【这个这么高,有没有影响呢?】
SQL compiler cardinality estimate          = 1
Degree of parallelism requested            = 1
Number of agents working on statement      = 1
Number of subagents created for statement  = 1
Statement sorts                            = 0
Total sort time                            = 0
Sort overflows                             = 0
Rows read                                  = 74208
Rows written                               = 0
Rows deleted                               = 0
Rows updated                               = 0
Rows inserted                              = 0
Rows fetched                               = 0
Buffer pool data logical reads             = 94167
Buffer pool data physical reads            = 9266
Buffer pool temporary data logical reads   = 0
Buffer pool temporary data physical reads  = 0
Buffer pool index logical reads            = 339239
Buffer pool index physical reads           = 54478
Buffer pool temporary index logical reads  = 0
Buffer pool temporary index physical reads = 0
Buffer pool xda logical reads              = 0
Buffer pool xda physical reads             = 0
Buffer pool temporary xda logical reads    = 0
Buffer pool temporary xda physical reads   = 0
Blocking cursor                            = YES
Dynamic SQL statement text:
select count(1) 总行数,count(1)    【完全语句就不方便贴这了】

当时整个系统CPU使用率比较高(90%),已确认CPU使用率高是由DB2引的,这个是其中一个正在执行APP的快照。收起
参与17

查看其它 15 个回答richard_macy的回答

richard_macyrichard_macy数据库管理员macys
rerun 这个 query, 可以重现问题吗?
零售/批发 · 2015-03-09
浏览1179

回答者

richard_macy
数据库管理员macys

richard_macy 最近回答过的问题

回答状态

  • 发布时间:2015-03-09
  • 关注会员:1 人
  • 回答浏览:1179
  • X社区推广