WEB开发网
开发学院数据库Oracle Oracle 10g数据库中如何分析响应时间 阅读

Oracle 10g数据库中如何分析响应时间

 2007-05-13 12:27:36 来源:WEB开发网   
核心提示: 可以从V$SYSMETRIC_SUMMARY视图中获得数据库整体性能效率的最大、最小和平均值:select CASE METRIC_NAMEWHEN 'SQL Service Response Time' then 'SQL Service Response Tim

可以从V$SYSMETRIC_SUMMARY视图中获得数据库整体性能效率的最大、最小和平均值:

select CASE METRIC_NAME
  WHEN 'SQL Service Response Time' then 'SQL Service Response Time (secs)'
  WHEN 'Response Time Per Txn' then 'Response Time Per Txn (secs)'
  ELSE METRIC_NAME
  END METRIC_NAME,
  CASE METRIC_NAME
  WHEN 'SQL Service Response Time' then ROUND((MINVAL / 100),2)
  WHEN 'Response Time Per Txn' then ROUND((MINVAL / 100),2)
  ELSE MINVAL
  END MININUM,
  CASE METRIC_NAME
  WHEN 'SQL Service Response Time' then ROUND((MAXVAL / 100),2)
  WHEN 'Response Time Per Txn' then ROUND((MAXVAL / 100),2)
  ELSE MAXVAL
  END MAXIMUM,
  CASE METRIC_NAME
  WHEN 'SQL Service Response Time' then ROUND((AVERAGE / 100),2)
  WHEN 'Response Time Per Txn' then ROUND((AVERAGE / 100),2)
  ELSE AVERAGE
  END AVERAGE
  from SYS.V_$SYSMETRIC_SUMMARY
  where METRIC_NAME in ('CPU Usage Per Sec',
  'CPU Usage Per Txn',
  'Database CPU Time Ratio',
  'Database Wait Time Ratio',
  'Executions Per Sec',
  'Executions Per Txn',
  'Response Time Per Txn',
  'SQL Service Response Time',
  'User Transaction Per Sec')
  ORDER BY 1;
  METRIC_NAME MININUM MAXIMUM AVERAGE
  CPU Usage Per Sec 0 53.9947577 11.1603280
  CPU Usage Per Txn 0 168.731666 24.8848615
  Database CPU Time Ratio 0 87.1866295 35.8114730
  Database Wait Time Ratio 0 90.7141859 64.1885269
  Executions Per Sec 0 540.768348 114.852472
  Executions Per Txn 0 1911 279.912779
  Response Time Per Txn (secs) 0 3.88 0.66
  SQL Service Response Time (secs) 0 0 0
  User Transaction Per Sec 0 4.70183486 0.94469007

上一页  1 2 3 4 5 6 7 8  下一页

Tags:Oracle 数据库 如何

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接