CS122aSlides12

CS122aSlides12 - ICS122A EECS116 Introduction to Data...

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

View Full Document Right Arrow Icon
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 
Background image of page 1

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

View Full DocumentRight Arrow Icon
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…?
Background image of page 2
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)
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
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…
Background image of page 5

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

View Full DocumentRight Arrow Icon
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)
Background image of page 6
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.
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
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 Right Arrow Icon
Ask a homework question - tutors are online