범위스캔(Range Scan)
B\*tree 인덱스
수직적 탐색 : 범위스캔(Range Scan) , 수평적 탐색을 위한 시작점을 찾는 과정
수평적 탐색 : 리프블록을 인덱스 레코드간 논리적 순서 에 따라 좌,우 스캔
브랜치 블록 스캔
결합 인덱스 구조와 탐색
(ex) deptno + sal 결합인덱스 : deptno = 20 and sal >= 2000 조건으로 쿼리
SELECT
rowid
FROM url_trace a
--------------------------------------------
AAA6Y2AARAAAAkTAAA
AAA6Y2AARAAAAkTAAB
AAA6Y2AARAAAAkTAAC
AAA6Y2AARAAAAkTAAD
AAA6Y2AARAAAAkTAAE
AAA6Y2AARAAAAkTAAF
AAA6Y2AARAAAAkTAAG
AAA6Y2AARAAAAkTAAH
AAA6Y2AARAAAAkTAAI
AAA6Y2AARAAAAkTAAJ
-rowid 디코딩
select rowid extended_format
, dbms_rowid.rowid_to_restricted(rowid,0) restricted_format
, dbms_rowid.rowid_object(rowid) object
, dbms_rowid.rowid_relative_fno(rowid) file_o
, dbms_rowid.rowid_block_number(rowid) block_no
, dbms_rowid.rowid_row_number(rowid) row_number
, rowid
FROM url_trace
--------------------------------------------
AAA6Y2AARAAAAkTAAA 00000913.0000.0011 239158 17 2323 0 AAA6Y2AARAAAAkTAAA
AAA6Y2AARAAAAkTAAB 00000913.0001.0011 239158 17 2323 1 AAA6Y2AARAAAAkTAAB
AAA6Y2AARAAAAkTAAC 00000913.0002.0011 239158 17 2323 2 AAA6Y2AARAAAAkTAAC
AAA6Y2AARAAAAkTAAD 00000913.0003.0011 239158 17 2323 3 AAA6Y2AARAAAAkTAAD
AAA6Y2AARAAAAkTAAE 00000913.0004.0011 239158 17 2323 4 AAA6Y2AARAAAAkTAAE
AAA6Y2AARAAAAkTAAF 00000913.0005.0011 239158 17 2323 5 AAA6Y2AARAAAAkTAAF
AAA6Y2AARAAAAkTAAG 00000913.0006.0011 239158 17 2323 6 AAA6Y2AARAAAAkTAAG
AAA6Y2AARAAAAkTAAH 00000913.0007.0011 239158 17 2323 7 AAA6Y2AARAAAAkTAAH
AAA6Y2AARAAAAkTAAI 00000913.0008.0011 239158 17 2323 8 AAA6Y2AARAAAAkTAAI
-rowid 포멧 타입 확인
select
dbms_rowid.rowid_type('AAA6Y2AARAAAAkTAAA') extended_format
, dbms_rowid.rowid_type('00000913.0000.0011') restricted_format
from dual
--------------------------------------------
1 0
-데이타 오브젝트 번호, 데이타파일 번호 확인