block 4kb가 넘어가면 table 밖에 별도의 lob segment가 만들어지고 따로 보관됨
4kb미만이면 테이블 안에 저장
resume 컬럼일 뿐
Symbol table
12 13 14 OCM
Non Breakable parse lock
select count(*) from hr.employees;
select namespace, pins, reloads, invalidations from v$librarycache;
execute dbms_stats.gather_table_stats('HR','EMPLOYEES');
select count(*) from hr.employees;
무효화된 커서는 Non Breakable parse lock으로 인해 못쓰게 된다
머추어 익스클루전
경량 직렬은 spin sleep를 과감히 제거한것임 웨이트가 없다
자원의 공유 및 보호
라이브러리 캐시
Prevents statement reparsing 하드파싱을 줄이는데 튜닝목표를 가지고 있다
라이브러리 캐시 덤프 떠야 함
청크 버킷 뮤텍스 래치에 대한 부분 다 나옴
orcl@SYS> alter session set tracefile_identifier='lcdump';
라이브러리 캐시 덤프
orcl@SYS> alter session set events 'immediate trace name library_cache level 10';
SELECT plan_hash_value, count(*)
FROM V$SQL
WHERE parsing_schema_name not in
('SYS','SYSMAN','DBSNMP')
5 GROUP BY plan_hash_value ORDER BY 2;
PLAN_HASH_VALUE COUNT(*)
--------------- ----------
992138068 1
3670631210 1
2877173184 1
2637181423 1
3972627342 1
144376333 1
SELECT sql_text, executions
FROM V$SQLAREA
WHERE plan_hash_value = 1388734953
SQL_TEXT
EXECUTIONS
----------
select count(*) from mdsys.sdo_tin_pc_sysdata_table where sdo_owner = :owner and table_name = :tname
1
버퍼?
캐시?
주기억장치와 보조기억장치 사이에 속도차를 줄이기 위한 고속 기억 장치 디스크 메모리
데이터 접근을 빠르게 할 수 있도록 데이터를 저장해두는 임시 장소
orcl@SYS> select set_id, dbwr_num from x$kcbwds order by set_id;
SET_ID DBWR_NUM
---------- ----------
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
16 rows selected.
Elapsed: 00:00:00.02
orcl@SYS> show parameter writer
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
db_writer_processes integer 1
orcl@SYS> show parameter dbw
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
dbwr_io_slaves integer 0
orcl@SYS> alter system set db_writer_processes = 2 scope=spfile;
System altered.
Elapsed: 00:00:00.02
orcl@SYS> startup force
ORACLE instance started.
Total System Global Area 422670336 bytes
Fixed Size 1336960 bytes
Variable Size 398461312 bytes
Database Buffers 16777216 bytes
Redo Buffers 6094848 bytes
Database mounted.
Database opened.
orcl@SYS> select set_id, dbwr_num from x$kcbwds order by set_id;
SET_ID DBWR_NUM
---------- ----------
1 0
2 1
3 0
4 1
5 0
6 1
7 0
8 1
9 0
10 1
11 0
12 1
13 0
14 1
15 0
16 1
16 rows selected.
Elapsed: 00:00:00.03
orcl@SYS>
스토리지 네트워크 트래픽의 대부분
디비라이터 개수 부족 + 스토리지의 낮은 속도
orcl@SYS> select * from dba_directories;
OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ------------------------------------------------------------
SYS SUBDIR
/u01/app/oracle/product/11.2.0/db_1/demo/schema/order_entry//2002/Sep
SYS XMLDIR
/ade/b/1191423112/oracle/rdbms/xml
SYS DIRPUMP
/home/oracle/datapump
[oracle@lnx02 datapump]$ expdp system/oracle directory=dirpump dumpfile=hr.dmp schemas=hr
- cd $oracle_home/rdbms/admin
- log into sqlplus as system
- run SQL> @utlxplan
- run SQL> create public synonym plan_table for plan_table
- run SQL> grant all on plan_table to public
- exit sqlplus and cd $oracle_home/sqlplus/admin
- log into sqlplus as SYS
- run SQL> @plustrce
- run SQL> grant plustrace to public
There's an option of creating the PLAN_TABLE table for every user that needs to use it (log in as that user and run the same 'utlxplan.sql').
If granting the 'plustrace' role to public doesn't work, you could also do the following:
Code: [Select all] [Show/ hide]
ALTER USER user_name DEFAULT ROLE plustrace;
'스터디북' 카테고리의 다른 글
<11/25> 소중한 사람 (0) | 2015.11.25 |
---|---|
<11/24> Call Me Baby (0) | 2015.11.24 |
[11/22] Bind Peeking && Adaptive Cursor Sharing (0) | 2015.11.22 |
<11/22> 상심 (0) | 2015.11.22 |
<11/20> Blind Love (0) | 2015.11.20 |