CS122aSlides12

# CS122aSlides12 - ICS122A EECS116 Introduction to Data...

This preview shows pages 1–8. Sign up to view the full content.

ICS122A / EECS116 Introduction to Data Management Spring 2009 TA Alex Behm (for Prof. Mike Carey) Bren School of ICS UC Irvine Slides based on previous CS122a lecture notes as well as  material borrowed from U-Wisconsin, Stanford, & Berkeley and  from UCI class CS222 prepared by Chen Li, and from Alex

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Announcements HWs and projects HW #4 due tonight by midnight HW #5 open tomorrow Project Part #3 due on May 21 Midterm grading… Hopefully done by end of this week! Today Indexing! Any lingering questions before we move on…?
Intro to Indexing: Motivation How is data of a relation stored on disk? File Block Record File: - Variable number of blocks - List of blocks Block: - Fixed number of bytes Record: - Variable or fixed size (depends on schema)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Intro to Indexing: Motivation Time to fetch block into memory? Access characteristics of magnetic disk: Seek time: move disk-head to track Rotational delay: wait until head under correct sector Transfer time: time to transfer data into memory Random access: Very high fixed cost Need to pay seek time and rotational delay every time (~10ms) Sequential access: Seek time and rotational delay paid once Much faster than random access
Intro to Indexing: Motivation How to answer queries on relation R? SELECT * FROM R WHERE R.A = “something”; SELECT * FROM R WHERE R.B >= 5 AND R.B <= 10; 1. Scan file, reading blocks one by one 2. For each tuple in block check condition Inefficient if very few tuples satisfy condition! The relation may be huge…

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What is an Index? - Mechanism for quickly finding specific tuples - Index key: one or several attributes - Index key pointers to records (or blocks) Index Search Key lookup follow pointer(s) (Index key may or may not be a candidate key of the relation)
Disk-Based vs. In-Memory Indexes May think of an index as e.g. a binary search tree, BUT: In DBMS indexes are stored in disk-blocks.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 06/18/2009 for the course CS 122a taught by Professor Carey during the Spring '09 term at UC Irvine.

### Page1 / 33

CS122aSlides12 - ICS122A EECS116 Introduction to Data...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online