SQL> select cache#, parameter, type, subordinate#, count, usage, fixed, gets ,getmisses
from v$rowcache order by cache#, type, subordinate# ;
CACHE# PARAMETER TYPE SUBORDINATE# COUNT USAGE FIXED GETS GETMISSES
---------- -------------------------------- ----------- ------------ ---------- ---------- ---------- ---------- ----------
0 dc_tablespaces PARENT 10 10 0 17216006 87
1 dc_free_extents PARENT 0 0 0 0 0
2 dc_segments PARENT 926 926 0 2761891 47480
3 dc_rollback_segments PARENT 25 25 1 3051290 24
4 dc_used_extents PARENT 0 0 0 0 0
5 dc_tablespace_quotas PARENT 0 0 0 220 32
6 dc_files PARENT 11 11 0 43505 44
7 dc_users SUBORDINATE 0 5 5 0 243337 145
7 dc_users SUBORDINATE 1 33 33 0 1509468 431
7 dc_users SUBORDINATE 2 0 0 0 0 0
8 dc_objects PARENT 1849 1849 116 13042484 168133
8 dc_object_grants SUBORDINATE 0 10 10 0 34906 8087
Select count(*) from all_objects ;
SQL> create or replace view my_objects as select * from user_objects ;
View created.
SQL> select referenced_owner, referenced_name, referenced_type
2 fromuser_dependencies
3 where name ='MY_OBJECTS';
REFERENCED_OWNER REFERENCED_NAME REFERENCED_TYPE
------------------------------ ------------------------------ -----------------
PUBLIC USER_OBJECTS SYNONYM
OPS$ORACLE USER_OBJECTS NON-EXISTENT
SQL> select referenced_owner, referenced_name, referenced_type
from user_dependencies
where name ='TEST_OBJECTS';
REFERENCED_OWNER REFERENCED_NAME REFERENCED_TYPE
------------------------------ ---------------------------------------------------------------- -----------------
PUBLIC USER_OBJECTS SYNONYM
OPS$ORACLE USER_OBJECTS NON-EXISTENT
2 rows selected.
SQL> CREATE TABLE USER_OBJECTS ( A1 NUMBER );
Statement Processed.
SQL>
select referenced_owner, referenced_name, referenced_type
from user_dependencies
where name ='TEST_OBJECTS';
REFERENCED_OWNER REFERENCED_NAME REFERENCED_TYPE
------------------------------ ---------------------------------------------------------------- -----------------
PUBLIC USER_OBJECTS SYNONYM
OPS$ORACLE USER_OBJECTS TABLE
2 rows selected.
: V$rowcache뷰의 한 로우와 v$rowcache_parent 및 v$rowcache_subordinate뷰 관계로 이해
[그림 7-1] 딕셔너리 캐시의 subset
SQL> select * from v$sgastat where name like '%KQR%' order by name
POOL NAME BYTES
------------ -------------------------- ----------
shared pool KQR ENQ 90816
shared pool KQR L PO 694960
shared pool KQR L SO 125992
shared pool KQR M PO 2199792
shared pool KQR M SO 549968
shared pool KQR S SO 26128
shared pool KQR X PO 30840
7 rows selected.
딕셔너리 캐시 내의 항목을 찾기 위해 해시 체인을 탐색하는 동안에 해시 체인이 변경되지 않도록 보호해야 한다.
딕셔너리 캐시 활동의 핵심은 해시 버킷과 해시 체인에 근거하며, 해시 체인은 읽기/쓰기 충돌로부터 보호되어야 함
테스트 주요 SP 설명
Snap_latch_child – v$latch_child뷰의 스냅샷 제공
Snap_rowcache -- v$rowcache뷰의 스냅샷 제공
결과