1 / 5

1. B* TREE INDEX

1. B* TREE INDEX. Root Block. 가장 범용적으로 사용되는 인덱스 (OLTP,DW..) Leaf Block 에 각 value 에 대한 Rowid 를 포함 (Table 의 Row 를 가르키는 Pointer 역할 ) Leaf Block 의 값은 정렬되어 있음 (Leaf Block 에 앞 , 뒤의 Leaf Node 에 대한 Link 를 가지고 있음 ) 인덱스를 통한 Table 의 1 row 조회시 최소 3 ~ 4 Block Access. max value min value.

gaille
Download Presentation

1. B* TREE INDEX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 1. B* TREE INDEX Root Block • 가장 범용적으로 사용되는 인덱스(OLTP,DW..) • Leaf Block에 각 value에 대한 Rowid를 포함 (Table의 Row를 가르키는 Pointer 역할) • Leaf Block의 값은 정렬되어 있음 (Leaf Block에 앞, 뒤의 Leaf Node에 대한 Link를 가지고 있음) • 인덱스를 통한 Table의 1 row 조회시 최소 3 ~ 4 Block Access max value min value Index Key Value Branch ROWID Leaf Key Column Length Index Entry Header

  2. 1. B* TREE INDEX SELECT .... WHERE ENAME = ‘LOVE’ A - K L – Z INDEX ① ② A - D E – G H - K L - O P – R S - Z ③ ADAMS AAA ADAMS AAB ADAMS AAC DAVIS AAR EDAM AAH FARRA AAG GOUCH AAQ HARRI ABC JONES AAT KANE ABY LOVE ACD MILER ACR ODEN AAP PRINE ACE QUEEN AAM RICRD ACW SMITH ARR VADEZ ARQ WITON AAX TABLE ④ ROWID SEARCH

  3. 1. B* TREE INDEX SELECT .... WHERE ENAME BETWEEN ‘DAVIS’ AND ‘GOUCH’ A - K L – Z INDEX ① A - D E – G H - K L - O P – R S - Z ② ③ ADAMS AAA ADAMS AAB ADAMS AAC DAVIS AAR EDAM AAH FARRA AAG GOUCH AAQ HARRI ABC JONES AAT KANE ABY LOVE ACD MILER ACR ODEN AAP PRINE ACE QUEEN AAM RICRD ACW SMITH ARR VADEZ ARQ WITON AAX TABLE ④ ROWID SEARCH

  4. empno gender married 001 WOMAN NO ... 002 WOMAN NO ... 003 MAN YES ... 004 MAN NO ... 005 WOMAN NO ... 006 MAN YES ... ... .... ..... ... 2. Bitmap INDEX SELECT count(*) FROM emp WHERE gender = ‘MAN' AND married = ‘YES' Bitmap Function Bitmap Index gender = ‘MAN‘ 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 gender = ‘WOMAN’ 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 married = ‘YES‘ 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 1 married = ‘NO’ 1 1 0 1 1 0 1 0 1 0 0 1 1 0 0 0 • each different key value has its own bitmap • each position in the bitmap maps to a possible ROWID • if value 1 true, 0 false

  5. 2. Bitmap INDEX 장점 • Cardinality가 낮은 열에 대해 사용 • Small Storage 사용 • AND/OR 등으로 결합된 복합 조건에 최적 • 전통적인 b*_Tree 인덱스의 단점 해소(or, not, null,..) • null column도 Index에 저장 • DATAWARE HOUSE등 대량의 Data를 Read Only Mode로 사용시에 적당 단점 • DML 작업에 취약 • Block Level Locking • Rule Base Optimizer에서는 사용 못함 • Online option(build, rebuild) 사용 못함

More Related