SQL> @?/rdbms/admin/awrsqrpt.sql

Current Instance

~~~~~~~~~~~~~~~~

DB Id DB Name Inst Num Instance

----------- ------------ -------- ------------

2545367939 RAC 1 rac1

Specify the Report Type

~~~~~~~~~~~~~~~~~~~~~~~

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

Instances in this Workload Repository schema

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DB Id Inst Num DB Name Instance Host

------------ -------- ------------ ------------ ------------

* 2545367939 1 RAC rac1 rac1

2545367939 2 RAC rac2 rac2

Using 2545367939 for database Id

Using 1 for instance number

Specify the number of days of snapshots to choose from

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Entering the number of days (n) will result in the most recent

(n) days of snapshots being listed. Pressing <return> without

specifying a number lists all completed snapshots.

Enter value for num_days: 1

Listing the last day's Completed Snapshots

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

Specify the Begin and End Snapshot Ids

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enter value for begin_snap: 3

Begin Snapshot Id specified: 3

Enter value for end_snap: 4

End Snapshot Id specified: 4

Specify the SQL Id

~~~~~~~~~~~~~~~~~~

Enter value for sql_id: 5mycvad72f8qc

SQL ID specified: 5mycvad72f8qc

Specify the Report Name

~~~~~~~~~~~~~~~~~~~~~~~

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

press <return> to continue, otherwise enter an alternative.

Enter value for report_name: lijiaman_awrsqpt_1.txt

Using the 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

Snap Id     Snap Time             Sessions Curs/Sess

---------   -------------------   -------- ---------

Begin Snap: 3           14-Jan-18 14:35:02    46        1.0

End Snap:   4           14-Jan-18 16:00:03    48        1.1

Elapsed:       85.01 (mins)

DB Time:       0.63 (mins)

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

Elapsed

SQL Id          Time (ms)

-------------   ----------

5mycvad72f8qc          18

Module: PL/SQL Developer

SQL ??????

select j.job_id, j.job_title, j.min_salary, j.max_s

alary, e.employee_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

-------------------------------------------------------------

SQL ID: 5mycvad72f8qc              DB/Inst: RAC/rac1 Snaps: 3-4

-> 1st Capture and Last Capture Snap IDs

refer to Snapshot IDs witin the snapshot range

-> select j.job_id, j.job_title, j.min_salary, ...

Plan Hash Total Elapsed 1st Capture Last Capture

#    Value            Time(ms)        Executions     Snap ID      Snap ID

--- ---------------- ---------------- ------------- ------------- --------------

1    303035560          18              2              4              4

-------------------------------------------------------------

Plan 1(PHV: 303035560)

----------------------

Plan Statistics                                DB/Inst: RAC/rac1 Snaps: 3-4

-> % 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             |           |        |         | 6 (100)    |          |

| 1 |  MERGE JOIN                  |           | 107    | 8988    | 6 (17)     | 00:00:01 |

| 2 |   TABLE ACCESS BY INDEX ROWID| JOBS      | 19     | 627     | 2 (0)      | 00:00:01 |

| 3 |    INDEX FULL SCAN           | JOB_ID_PK | 19     |         | 1 (0)      | 00:00:01 |

| 4 |   SORT JOIN                  |           | 107    | 5457    | 4 (25)     | 00:00:01 |

| 5 |    TABLE ACCESS FULL         | EMPLOYEES | 107    | 5457    | 3 (0)      | 00:00:01 |

-------------------------------------------------------------------------------------------

Full SQL Text

SQL ID SQL Text

------------ -----------------------------------------------------------------

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

oyee_id, e.first_name||e.last_name as name, e.email, e.phone_numb

er from jobs j, employees e where j.job_id = e.job_id

使用awrsqrpt.sql查看执行计划demo的更多相关文章

  1. oracle执行计划(二)----如何查看执行计划

    目录: (一)六种执行计划  (1)explain plan for  (2)set autotrace on  (3)statistics_level=all  (4)dbms_xplan.disp ...

  2. oralce 查看执行计划

    SQL的执行计划实际代表了目标SQL在Oracle数据库内部的具体执行步骤,作为调优,只有知道了优化器选择的执行计划是否为当前情形下最优的执行计划,才能够知道下一步往什么方向. 执行计划的定义:执行目 ...

  3. db2数据库创建索引,删除索引,查看表索引,SQL语句执行计划以及优化建议

    1.建立表索引 create index 索引名 on 表名(列名,列名); 2.删除表索引 drop index 索引名 on 表名; 3.查看表索引 select * from sysibm.sy ...

  4. KingbaseES 如何查看应用执行的SQL的执行计划

    通过explain ,我们可以获取特定SQL 的执行计划.但对于同一条SQL,不同的变量.不同的系统负荷,其执行计划可能不同.我们要如何取得SQL执行时间点的执行计划?KingbaseES 提供了 a ...

  5. oracle如何查看执行计划

    1.在PL/SQL Developer中得到一个SQL的执行计划 输入想要查看执行计划的目标SQL,再按一下快捷键F5就可以了.2.explain plan 命令 explain plan for + ...

  6. oracle查看执行计划以及使用场景

    文档结构: oracle执行计划使用场景 环境: Centos 6.10 Oracle 18.3.0.0.0 c 11g默认启动了自动统计信息收集的任务,默认运行时间是周一到周五晚上10点和周6,周天 ...

  7. ORACLE从共享池删除指定SQL的执行计划

    Oracle 11g在DBMS_SHARED_POOL包中引入了一个名为PURGE的新存储过程,用于从对象库缓存中刷新特定对象,例如游标,包,序列,触发器等.也就是说可以删除.清理特定SQL的执行计划 ...

  8. SQL Server 执行计划缓存

    标签:SQL SERVER/MSSQL SERVER/数据库/DBA/内存池/缓冲区 概述 了解执行计划对数据库性能分析很重要,其中涉及到了语句性能分析与存储,这也是写这篇文章的目的,在了解执行计划之 ...

  9. 浅析SQL SERVER执行计划中的各类怪相

    在查看执行计划或调优过程中,执行计划里面有些现象总会让人有些疑惑不解: 1:为什么同一条SQL语句有时候会走索引查找,有时候SQL脚本又不走索引查找,反而走全表扫描? 2:同一条SQL语句,查询条件的 ...

随机推荐

  1. 2019 GDD TensorFlow

    https://www.tensorflow.org/ https://tensorflow.google.cn/     (中文站点) 现场PPT照片:    https://pan.baidu.c ...

  2. Operation之其他实用操作符

    delay 该操作符会将 Observable 的所有元素都先拖延一段设定好的时间, 然后才将他们发送出来 Observable.of(1,2,3,4) .delay(5, scheduler: Ma ...

  3. 多用户同时操作一条Mysql记录问题

    场景:两个用户同时读取了数据库中的一条记录,此时用户A对其中一个字段的值进行了修改操作并进行了提交,后来用户B也对这个字段进行了修改,用户B的提交将会覆盖用户A提交的值 关于乐观锁和悲观锁 悲观锁:每 ...

  4. webuploader超时时间timeout设置

    参考:http://www.codingwhy.com/view/841.html 备注下!

  5. openssl 和libcurl的安装

    /usr/lib/aarch64-linux-gnu/qt5/bin/qmake CONFIG+=release 1 SET(CMAKE_PREFIX_PATH /home/qilin64/Qt5.6 ...

  6. lnmp卸载删除多余的php版本

    /etc/init.d/php-fpm5.3 stoprm -rf /usr/local/php5.3rm -f /etc/init.d/php-fpm5.3rm -f /usr/local/ngin ...

  7. c#中泛型2

    这篇主要讲解泛型协变与逆变,有不正确的地方欢迎指正: 泛型协变与逆变 “协变”是指能够使用与原始指定的派生类型相比,派生程度更大的类型. “逆变”则是指能够使用派生程度更小的类型. 泛型中的继承需要用 ...

  8. 【C++】static关键字有哪些用法?其主要作用是什么?

    static关键字的用法: 1)将全局变量修饰为静态全局变量 存储在静态存储区,整个程序运行期间一直存在 静态全局变量在声明它的文件之外是不可见的,只要声明它的文件可见,而普通的全局变量则是所有文件可 ...

  9. 【转帖】Infor转型十年启示录:ERP套件厂商为什么要做云平台?

    Infor转型十年启示录:ERP套件厂商为什么要做云平台? https://www.tmtpost.com/4199274.html 好像浪潮国际 就是用的infor的ERP软件. 秦聪慧• 2019 ...

  10. dp --- acdream原创群赛(16) --- B - Apple

    <传送门> B - Apple Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Other ...