博客
关于我
使用awrsqrpt.sql查看执行计划demo
阅读量:438 次
发布时间:2019-03-06

本文共 2589 字,大约阅读时间需要 8 分钟。

以下是优化后的内容:


当前实例信息

DB Id DB Name Inst Num Instance


2545367939 RAC 1 rac1

报告类型选择

Would you like an HTML report, or a plain text report?

Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'

Enter value for report_type: text

Type Specified: text

实例在这个工作负载仓库架构中

DB Id Inst Num DB Name Instance


  • 2545367939 1 RAC rac1 rac1
    2545367939 2 RAC rac2 rac2

使用 2545367939 为数据库 Id

使用 1 为实例编号

指定要保留的快照天数

Entering the number of days (n) will result in the most recent (n) days of snapshots being listed. Pressing

without specifying a number lists all completed snapshots.

Enter value for num_days: 1

最近一天的完成快照

Snap Instance DB Name Snap Id Snap Started Level


rac1 RAC 3 14 Jan 2018 14:35 1

4 14 Jan 2018 16:00 1

指定快照的开始和结束快照 ID

Enter value for begin_snap: 3

Begin Snapshot Id specified: 3

Enter value for end_snap: 4

End Snapshot Id specified: 4

指定 SQL ID

Enter value for sql_id: 5mycvad72f8qc

报告名称

The default report file name is awrsqlrpt_1_3_4.txt. To use this name, press

to continue, otherwise enter an alternative.

Enter value for report_name: lijiaman_awrsqpt_1.txt

报告内容如下:

WORKLOAD REPOSITORY SQL Report

Snapshot Period Summary

DB Name DB Id Instance Inst Num Startup Time Release RAC


RAC 2545367939 rac1 1 14-Jan-18 14:23 11.2.0.1.0 YES

SQL Summary DB/Inst: RAC/rac1 Snaps: 3-4

Elapsed Time (ms) Time (ms) Executions Snap ID Snap ID


1 303035560 18 2 2 4

Plan Hash Total DB Time Elapsed Time (ms) Executions Snap ID Snap ID

Value Time(ms) Time(ms) Per Execution % Snap


1 303035560 18 9.1 0.0

Plan 1(PHV: 303035560)

Plan Statistics

% Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100

Stat Name Statement Per Execution % Snap

Elapsed Time (ms) 18 9.1 0.0
CPU Time (ms) 7 3.5 0.0
Executions 2 N/A N/A
Buffer Gets 23 11.5 0.0
Disk Reads 1 0.5 0.0
Parse Calls 2 1.0 0.0
Rows 214 107.0 N/A
User I/O Wait Time (ms) 9 N/A N/A
Cluster Wait Time (ms) 0 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 0 N/A N/A
Invalidations 0 N/A N/A
Version Count 2 N/A N/A
Sharable Mem(KB) 34 N/A N/A

Execution Plan

Id Operation Name Rows Bytes Cost (%CPU) Time

0 SELECT STATEMENT 214 5457 6 (100)
1 MERGE JOIN 107 8988 6 (17)
2 TABLE ACCESS BY INDEX ROWID JOBS 19 627 2 (0)
3 INDEX FULL SCAN JOB_ID_PK 19 627 1 (0)
4 SORT JOIN 107 5457 4 (25)
5 TABLE ACCESS FULL EMPLOYEES 107 5457 3 (0)

Full SQL Text

SQL ID SQL Text


5mycvad72f8q select j.job_id, j.job_title, j.min_salary, j.max_salary, e.emplo

yee_id, e.first_name||e.last_name as name, e.email, e.phone_number from jobs j, employees e where j.job_id = e.job_id


转载地址:http://iysyz.baihongyu.com/

你可能感兴趣的文章
oauth2-shiro 添加 redis 实现版本
查看>>
OAuth2.0_JWT令牌-生成令牌和校验令牌_Spring Security OAuth2.0认证授权---springcloud工作笔记148
查看>>
OAuth2.0_授权服务配置_Spring Security OAuth2.0认证授权---springcloud工作笔记140
查看>>
OAuth2.0_授权服务配置_资源服务测试_Spring Security OAuth2.0认证授权---springcloud工作笔记146
查看>>
object detection错误之Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
查看>>
Objective-C享元模式(Flyweight)
查看>>
Objective-C以递归的方式实现二叉搜索树算法(附完整源码)
查看>>
Objective-C实现1000 位斐波那契数算法(附完整源码)
查看>>
Objective-C实现2 个数字之间的算术几何平均值算法(附完整源码)
查看>>
Objective-C实现3n+1猜想(附完整源码)
查看>>
Objective-C实现A-Star算法(附完整源码)
查看>>
Objective-C实现all combinations所有组合算法(附完整源码)
查看>>
Objective-C实现An Armstrong number阿姆斯特朗数算法(附完整源码)
查看>>
Objective-C实现anagrams字谜算法(附完整源码)
查看>>
Objective-C实现ApproximationMonteCarlo蒙特卡洛方法计算pi值算法 (附完整源码)
查看>>
Objective-C实现area under curve曲线下面积算法(附完整源码)
查看>>
Objective-C实现armstrong numbers阿姆斯壮数算法(附完整源码)
查看>>
Objective-C实现atoi函数功能(附完整源码)
查看>>
Objective-C实现average mean平均数算法(附完整源码)
查看>>
Objective-C实现base64加密和base64解密算法(附完整源码)
查看>>