等待模擬-library cache shared pool 硬解析
drop table test1;
create table test1
(it int);
insert into test1
values(10);
create table test2
as
select * from test1;
create table test3
as
select * from test1;
create table test4
as
select * from test1;
create table test5
as
select * from test1;
create table test6
as
select * from test1;
create table test7
as
select * from test1;
create table test8
as
select * from test1;
create table test9
as
select * from test1;
create table test10
as
select * from test1;
create table test11
as
select * from test1;
create table test12
as
select * from test1;
create table test13
as
select * from test1;
create table test14
as
select * from test1;
create table test15
as
select * from test1;
create table test16
as
select * from test1;
create table test17
as
select * from test1;
create table test18
as
select * from test1;
create table test19
as
select * from test1;
create table test20
as
select * from test1;
create table test21
as
select * from test1;
引發500000次的硬解析,
為了不引發軟解析,建立唯一的SQL語句。
SGA設定為150M
create or replace procedure do_hard_parse(p_idx in number)
is
v_value number;
v_cursor sys_refcursor;
begin
for idx in 1..500000 loop
open v_cursor for 'select '||p_idx||' from '||rpad('',idx)||' test'||p_idx||' where rownum=1';
fetch v_cursor into v_value;
close v_cursor;
end loop;
end;
清空shared pool
alter system flush shared_pool;
同時在30個會話執行
var job_no number;
begin
for idx in 1..20 loop
dbms_job.submit(:job_no,'do_hard_parse('||idx||');');
end loop;
commit;
end;
開啟一個會話執行
execute do_hard_parse(21);
使用觀察
select * from v$session_event a,(select SID from v$mystat where rownum<=1) b
where a.SID=b.sid order by TIME_WAITED desc;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-764951/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 等待模擬-library cache 軟解析
- Shared pool的library cache lock/pin及硬解析
- library cache pin等待事件的模擬事件
- 模擬cache buffers chains與library cache pin等待事件AI事件
- oradebug poke模擬shared pool latch與硬解析原理小析
- 深入理解shared pool共享池之library cache的library cache lock系列四
- 深入理解shared pool共享池之library cache的library cache pin系列三
- 等待模擬-cache buffer chainAI
- 優化Shared Pool Latch與Library Cache Latch競爭優化
- shared pool library cache latch 競爭優化辦法優化
- shared pool之三:library cache結構/library cache object的結構-dump LibraryHandleObject
- Flush an Object Out The Library Cache [SGA] Using The DBMS_SHARED_POOLObject
- Shared Pool優化和Library Cache Latch衝突優化優化
- 深入理解shared pool共享池之library cache系列一
- 深入理解shared pool共享池之library cache系列二
- 故障排除:Shared Pool優化和Library Cache Latch衝突優化優化
- 共享池之六:shared pool latch/ library cache latch /lock pin 簡介
- 【等待事件】library cache pin事件
- 等待事件--library cache pin事件
- library cache pin等待分析
- LIBRARY CACHE LOCK 等待事件事件
- library cache pin 等待事件事件
- SHARED_POOL解析
- latch:library cache lock等待事件事件
- 定位Library Cache pin,Library Cache lock等待的解決方法
- 轉_診斷latch:shared pool等待事件事件
- 《深入解析Oracle》第六章,Buffer Cache與Shared Pool原理Oracle
- 解決library cache pin等待事件事件
- enq:Library cache lock/pin等待事件ENQ事件
- 查詢Library Cache Pin等待原因
- oracle10g_oracle11g_library cache_shared pool管理方面的小區別Oracle
- 模擬library cahe lock/pin等待事件以及問題定位事件
- 分析解決因”library cache pin”等待
- 11G資料庫之library cache lock及library cache pin模擬結合hanganalyze定位資料庫
- 深入理解shared pool共享池空間及library cache分配之ora-4031 系列一
- 【每日一摩斯】-Shared Pool優化和Library Cache Latch衝突優化 (1523934.1)-系列6優化
- 【每日一摩斯】-Shared Pool優化和Library Cache Latch衝突優化 (1523934.1)-系列5優化
- 【每日一摩斯】-Shared Pool優化和Library Cache Latch衝突優化 (1523934.1)-系列4優化