Introduction to Data Indexing: Classifications and Properties
Walid G. Aref
Walid G. Aref
Introduction to Data Indexing: Classifications and Properties Walid - - PowerPoint PPT Presentation
Introduction to Data Indexing: Classifications and Properties Walid G. Aref Walid G. Aref Introduction The target of an index is to provide speedy retrieval of data from an underlying table Input: One or more values (also, termed search
Walid G. Aref
Walid G. Aref
Walid G. Aref
table
students with the same GPA)
Walid G. Aref
Walid G. Aref
Table
1. The entire table (Index-based Tables) 2. (Key value, Tuple-identifier) pairs 3. Key value, Set of Tuple-identifiers
Walid G. Aref
Table
same as the primary key for table
bucket (disk page) that contains the entire tuple
Walid G. Aref
Table Tree-based Index Search Path Hash-based Index Hash Table Table Stored Inside the Hash Buckets
Walid G. Aref
Table Tree-based Index Search Path Hash-based Index Hash Table Table Stored Inside the Hash Buckets
Walid G. Aref
Table Tree-based Index Search Path Leaf Level contains (value, Tid) pairs
index
Walid G. Aref
Table Tree-based Index Search Path Leaf Level contains (value, Tid) pairs Table is sorted based on the same attribute as that of the index
same attribute as that of the index
different attribute than that of the index (or not sorted at all)
range will end up being contiguous in the case of a clustered index
in the range is Nr
#$⌉, Un-clustered index: ~Nr
Walid G. Aref
Table Tree-based Index Search Range Table Tree-based Index Search Range
index on GPA) where values are repeated.
length records
length records (in most cases, e.g., an exception in when the key-value is a string)
Walid G. Aref
Table Tree-based Index Search Path Leaf Level contains (value, Set of tids) For tuples with that value
this comb-like connection between index and table
(the rest are sorted.
Walid G. Aref
Table Tree-based Dense Index Table Tree-based Sparse Index assuming Page stores 3 tuples Table Tree-based Sparse Index assuming Page stores 3 tuples
different attribute than that of the index (or not sorted at all)
range will end up being contiguous in the case of a clustered index
have to be un-clustered
un-clustered index?
Walid G. Aref
Table An Unclustered Tree-based Index Search Range Table A Clustered Tree-based Index Search Range
up being in separate pages
#$⌉ I/O
Walid G. Aref
Table An Unclustered Tree-based Index Search Range
Find grade of sid=0111 in cid=CS580
Walid G. Aref
sid cid grade 0111 CS541 A 0111 CS580 B 0333 CS448 A- 0444 CS348 B 0333 CS580 A Enrolled Table
capabilities
based index
concatenating AB
predicate on A and Range predicate on B, Range on only A
Walid G. Aref
sid cid grade 0111 CS541 A 0111 CS580 B 0333 CS448 A- 0444 CS348 B 0333 CS580 A Enrolled Table
Composite vs. One-attribute indexes
Walid G. Aref
sid cid grade 0111 CS541 A 0111 CS580 B 0333 CS448 A- 0444 CS348 B 0333 CS580 A Enrolled Table
Walid G. Aref
sid cid grade 0111 CS541 A 0111 CS580 B 0333 CS448 A- 0444 CS348 B 0333 CS580 A Enrolled Table
corresponding tuple and check the cid value on the fly
this tuple as output
corresponding tuple and check the sid value on the fly
this tuple as output
use?
up retrieving the least number of tuples (i.e., the one with high selectivity
Walid G. Aref
sid cid grade 0111 CS541 A 0111 CS580 B 0333 CS448 A- 0444 CS348 B 0333 CS580 A Enrolled Table
Walid G. Aref