25
Indexing

Indexing. 421: Database Systems - Index Structures 2 Cost Model for Data Access q Data should be stored such that it can be accessed fast q Evaluation

Embed Size (px)

DESCRIPTION

421: Database Systems - Index Structures 3 Typical Operations q Scan over all records I SELECT * FROM Employee q Equality Search I SELECT * FROM Employee WHERE eid = 100 q Range Search I SELECT * FROM Employee WHERE age > 30 and age 30 AND age

Citation preview

Indexing 421: Database Systems - Index Structures 2 Cost Model for Data Access q Data should be stored such that it can be accessed fast q Evaluation of Access Methods based on measuring the number of page I/Os I disk access in general more costly than CPU costs I CPU costs considered to be negligible in comparison with I/O I Analysis ignores gains of pre-fetching blocks of pages; thus, even I/O cost is only approximated. I Average-case analysis; based on several simplistic assumptions. Good enough to show the overall trends! 421: Database Systems - Index Structures 3 Typical Operations q Scan over all records I SELECT * FROM Employee q Equality Search I SELECT * FROM Employee WHERE eid = 100 q Range Search I SELECT * FROM Employee WHERE age > 30 and age 30 AND age