如果我把计划书共享单车项目计划书出去

Oracle运维(18)
1.scott用户查询SPID
scott@PROD&select distinct(sid) from v$
&&&&&& SID
----------
scott@PROD&select p.spid,p.pid from v$process p,v$session s where s.paddr=p.addr and s.sid=45;
SPID&&&&&&&&&&&&&&&&&&& PID
------------------------ ----------
10216&&&&&&&&&&&&&&&&&&& 36
2.SYS用户打开10046事件
sys@PROD&oradebug setospid 10216
Oracle pid: 36, Unix process pid: 10216, image: oracle@gc1 (TNS V1-V3)
sys@PROD&oradebug event 10046 trace name context forever,level 12;
Statement processed.
3.SCOTT用户做查询
scott@PROD&select count(*) from t1; --硬解析
& COUNT(*)
----------
&&&& 50218
scott@PROD&select count(*) from t1;--软解析
& COUNT(*)
----------
&&&& 50218
scott@PROD&grant select on t1--对表t1做DDL操作
Grant succeeded.
scott@PROD&select count(*) from t1; --这次应该是硬解析
& COUNT(*)
----------
&&&& 50218
scott@PROD&select count(*) from t1;&
& COUNT(*)
----------
&&&& 50218
4.结束10046,查出trace文件路径
sys@PROD&oradebug event 10046 tr
Statement processed.
sys@PROD&oradebug tracefile_name
/u01/app/oracle/oradata/PROD/dump/diag/rdbms/prod/PROD/trace/PROD_ora_10216.trc
[oracle@gc1:/u01/app/oracle/oradata/PROD/dump/diag/rdbms/prod/PROD/trace]$&tkprof PROD_ora_10216.trc PROD_ora_10216.trc.tk1&aggregate=no
sys=no --相同的SQL不合并
TKPROF: Release 11.2.0.1.0 - Development on Wed Jan 28 21:58:31 2015
Copyright (c) , Oracle and/or its affiliates.& All rights reserved.
[oracle@gc1:/u01/app/oracle/oradata/PROD/dump/diag/rdbms/prod/PROD/trace]$ less PROD_ora_10216.trc.tk1
TKPROF: Release 11.2.0.1.0 - Development on Wed Jan 28 21:58:31 2015
Copyright (c) , Oracle and/or its affiliates.& All rights reserved.
Trace file: PROD_ora_10216.trc
Sort options: default
********************************************************************************
count&&& = number of times OCI procedure was executed
cpu&&&&& = cpu time in seconds executing
elapsed& = elapsed time in seconds executing
disk&&&& = number of physical reads of buffers from disk
query&&& = number of buffers gotten for consistent read
current& = number of buffers gotten in current mode (usually for update)
rows&&&& = number of rows processed by the fetch or execute call
--------------------------------------------------------------------------------
*** SESSION ID:(45.515)
21:51:28.679
********************************************************************************
SQL ID: 5bc0v4my7dvr5
Plan Hash:
select count(*)
call&&&& count&&&&&& cpu&&& elapsed&&&&&& disk&&&&& query&&& current&&&&&&& rows
------- ------& -------- ---------- ---------- ---------- ----------& ----------
Parse&&&&&&& 1&&&&& 0.03&&&&&& 0.03&&&&&&&&& 0&&&&&&&& 39&&&&&&&&& 0&&&&&&&&&& 0
Execute&&&&& 1&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
Fetch&&&&&&& 2&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&& 206&&&&&&&&& 0&&&&&&&&&& 1
------- ------& -------- ---------- ---------- ---------- ----------& ----------
total&&&&&&& 4&&&&& 0.04&&&&&& 0.04&&&&&&&&& 0&&&&&&& 245&&&&&&&&& 0&&&&&&&&&& 1
Misses in library cache during parse:&1 --第一次为硬解析
Optimizer mode: ALL_ROWS
Parsing user id: 33&
Rows&&&& Row Source Operation
-------& ---------------------------------------------------
&&&&& 1& SORT AGGREGATE (cr=206 pr=0 pw=0 time=0 us)
& 50218&& TABLE ACCESS FULL T1 (cr=206 pr=0 pw=0 time=26194 us cost=56 size=0 card=49953)
Elapsed times include waiting on following events:
& Event waited on&&&&&&&&&&&&&&&&&&&&&&&&&&&& Times&& Max. Wait& Total Waited
& ----------------------------------------&& Waited& ----------& ------------
& SQL*Net message to client&&&&&&&&&&&&&&&&&&&&&& 2&&&&&&& 0.00&&&&&&&&& 0.00
& Disk file operations I/O&&&&&&&&&&&&&&&&&&&&&&& 1&&&&&&& 0.00&&&&&&&&& 0.00
& SQL*Net message from client&&&&&&&&&&&&&&&&&&&& 2&&&&&&& 1.33&&&&&&&&& 1.33
********************************************************************************
SQL ID: 5bc0v4my7dvr5
Plan Hash:
select count(*)
call&&&& count&&&&&& cpu&&& elapsed&&&&&& disk&&&&& query&&& current&&&&&&& rows
------- ------& -------- ---------- ---------- ---------- ----------& ----------
Parse&&&&&&& 1&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
Execute&&&&& 1&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
Fetch&&&&&&& 2&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&& 206&&&&&&&&& 0&&&&&&&&&& 1
------- ------& -------- ---------- ---------- ---------- ----------& ----------
total&&&&&&& 4&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&& 206&&&&&&&&& 0&&&&&&&&&& 1
Misses in library cache during parse:&0&--软解析
Optimizer mode: ALL_ROWS
Parsing user id: 33&
Rows&&&& Row Source Operation
-------& ---------------------------------------------------
&&&&& 1& SORT AGGREGATE (cr=206 pr=0 pw=0 time=0 us)
& 50218&& TABLE ACCESS FULL T1 (cr=206 pr=0 pw=0 time=36544 us cost=56 size=0 card=49953)
Elapsed times include waiting on following events:
& Event waited on&&&&&&&&&&&&&&&&&&&&&&&&&&&& Times&& Max. Wait& Total Waited
& ----------------------------------------&& Waited& ----------& ------------
& SQL*Net message to client&&&&&&&&&&&&&&&&&&&&&& 2&&&&&&& 0.00&&&&&&&&& 0.00
& SQL*Net message from client&&&&&&&&&&&&&&&&&&&& 2&&&&&& 22.33&&&&&&&& 22.33
********************************************************************************
SQL ID: g93b08rgfknc5
Plan Hash: 0
grant select on t1 to tom
call&&&& count&&&&&& cpu&&& elapsed&&&&&& disk&&&&& query&&& current&&&&&&& rows
------- ------& -------- ---------- ---------- ---------- ----------& ----------
Parse&&&&&&& 1&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
Execute&&&&& 1&&&&& 0.02&&&&&& 0.02&&&&&&&&& 0&&&&&&&& 71&&&&&&&&& 2&&&&&&&&&& 0
Fetch&&&&&&& 0&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
------- ------& -------- ---------- ---------- ---------- ----------& ----------
total&&&&&&& 2&&&&& 0.02&&&&&& 0.02&&&&&&&&& 0&&&&&&&& 71&&&&&&&&& 2&&&&&&&&&& 0
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 33&
Elapsed times include waiting on following events:
& Event waited on&&&&&&&&&&&&&&&&&&&&&&&&&&&& Times&& Max. Wait& Total Waited
& ----------------------------------------&& Waited& ----------& ------------
& log file sync&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 1&&&&&&& 0.01&&&&&&&&& 0.01
& SQL*Net message to client&&&&&&&&&&&&&&&&&&&&&& 1&&&&&&& 0.00&&&&&&&&& 0.00
& SQL*Net message from client&&&&&&&&&&&&&&&&&&&& 1&&&&&&& 2.23&&&&&&&&& 2.23
********************************************************************************
SQL ID: 5bc0v4my7dvr5
Plan Hash:
select count(*)
call&&&& count&&&&&& cpu&&& elapsed&&&&&& disk&&&&& query&&& current&&&&&&& rows
------- ------& -------- ---------- ---------- ---------- ----------& ----------
Parse&&&&&&& 1&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
Execute&&&&& 1&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
Fetch&&&&&&& 2&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&& 206&&&&&&&&& 0&&&&&&&&&& 1
------- ------& -------- ---------- ---------- ---------- ----------& ----------
total&&&&&&& 4&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&& 206&&&&&&&&& 0&&&&&&&&&& 1
Misses in library cache during parse:&1 --grant后的这次执行重新进行了解析
Optimizer mode: ALL_ROWS
Parsing user id: 33&
Rows&&&& Row Source Operation
-------& ---------------------------------------------------
&&&&& 1& SORT AGGREGATE (cr=206 pr=0 pw=0 time=0 us)
& 50218&& TABLE ACCESS FULL T1 (cr=206 pr=0 pw=0 time=47022 us cost=56 size=0 card=49953)
Elapsed times include waiting on following events:
& Event waited on&&&&&&&&&&&&&&&&&&&&&&&&&&&& Times&& Max. Wait& Total Waited
& ----------------------------------------&& Waited& ----------& ------------
& SQL*Net message to client&&&&&&&&&&&&&&&&&&&&&& 2&&&&&&& 0.00&&&&&&&&& 0.00
& SQL*Net message from client&&&&&&&&&&&&&&&&&&&& 2&&&&&&& 7.62&&&&&&&&& 7.62
********************************************************************************
SQL ID: 5bc0v4my7dvr5
Plan Hash:
select count(*)
call&&&& count&&&&&& cpu&&& elapsed&&&&&& disk&&&&& query&&& current&&&&&&& rows
------- ------& -------- ---------- ---------- ---------- ----------& ----------
Parse&&&&&&& 1&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
Execute&&&&& 1&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&& 0&&&&&&&&&& 0
Fetch&&&&&&& 2&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&& 206&&&&&&&&& 0&&&&&&&&&& 1
------- ------& -------- ---------- ---------- ---------- ----------& ----------
total&&&&&&& 4&&&&& 0.00&&&&&& 0.00&&&&&&&&& 0&&&&&&& 206&&&&&&&&& 0&&&&&&&&&& 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 33&
Rows&&&& Row Source Operation
-------& ---------------------------------------------------
&&&&& 1& SORT AGGREGATE (cr=206 pr=0 pw=0 time=0 us)
& 50218&& TABLE ACCESS FULL T1 (cr=206 pr=0 pw=0 time=41144 us cost=56 size=0 card=49953)
Elapsed times include waiting on following events:
& Event waited on&&&&&&&&&&&&&&&&&&&&&&&&&&&& Times&& Max. Wait& Total Waited
& ----------------------------------------&& Waited& ----------& ------------
& SQL*Net message to client&&&&&&&&&&&&&&&&&&&&&& 2&&&&&&& 0.00&&&&&&&&& 0.00
& SQL*Net message from client&&&&&&&&&&&&&&&&&&&& 1&&&&&&& 0.00&&&&&&&&& 0.00
由此我们可以看出对sql中的对象做DDL操作会把该执行计划踢出共享池
生产中最安全的就是GRANT这种方式了
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:83439次
积分:1925
积分:1925
排名:第18498名
原创:112篇
评论:18条
(2)(1)(5)(1)(9)(44)(1)(1)(3)(2)(16)(6)(1)(3)(3)(20) 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
我的家庭旅游计划书
下载积分:30
内容提示:我的家庭旅游计划书
文档格式:PDF|
浏览次数:534|
上传日期: 12:53:16|
文档星级:
全文阅读已结束,如果下载本文需要使用
 30 积分
下载此文档
该用户还上传了这些文档
我的家庭旅游计划书
官方公共微信}

我要回帖

更多关于 共享单车创业计划书 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信