跟着吕易做图(VAGE)揭密隐含参数:_db_writer_coalesce_area_size
最近在看吕易做图的大作《Oracle核心揭密》,马上要上市了,期待中。。。
这部大作可以与Jonathan Lewis易做图的《Oracle Core_ Essential Internals for DBA》相提并论,看了几天收益颇多,哈哈美国有Lewis,中国有VAGE。
gyj@OCM> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
gyj@OCM> show parameter mem
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 0
memory_target big integer 0
shared_memory_address integer 0
gyj@OCM> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 372M
sga_target big integer 0
gyj@OCM> show parameter db_cache
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_cache_advice string ON
db_cache_size big integer 100M
gyj@OCM> show parameter mttr
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fast_start_mttr_target integer 0
_db_writer_coalesce_area_size Size of memory allocated to dbwriter for coalescin 1048576
gyj@OCM>create table gyj100 (id int,name varchar2(2000));
gyj@OCM> declare
2 c number :=0 ;
3 begin
4 for i in 1 .. 5000000 loop
5 insert into gyj100 values(i,'gyj'||i);
6 c := c+1;
7 if mod(c,5000)=0 then
8 commit;
9 end if;
10 end loop;
11 end;
12 /
PL/SQL procedure successfully completed.
gyj@OCM> select bytes/1024/1024 sz from user_segments where segment_name='GYJ100';
SZ
----------
120
gyj@OCM> select sid from v$mystat where rownum=1;
SID
----------
125
gyj@OCM> update gyj100 set id=id+0 where rownum<=5000000;
5000000 rows updated.
Elapsed: 00:00:47.50
再开一个窗口观察等待事件:
gyj@OCM> select * from V$SESSION_wait where sid=125;
SID SEQ# EVENT P1TEXT P1 P1RAW P2TEXT P2 P2RAW P3TEXT P3 P3RAW WAIT_CLASS_ID WAIT_CLASS# WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE WAIT_TIME_MICRO TIME_REMAINING_MICRO TIME_SINCE_LAST_WAIT_MICRO
---------- ---------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------- ---------------- ---------------------------------------------------------------- ---------- ---------------- ---------------------------------------------------------------- ---------- ---------------- ------------- ----------- ---------------------------------------------------------------- ---------- --------------- ------------------- --------------- -------------------- --------------------------
125 45323 log buffer space 0 00