{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

442_StorageIndexing

442_StorageIndexing - DBMSStorageand Indexing DiskStorage...

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

View Full Document Right Arrow Icon
DBMS Storage and  Indexing
Background image of page 1

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

View Full Document Right Arrow Icon
Disk Storage
Background image of page 2
Disks and Files  DBMS stores information on (“hard”) disks. This has major implications for DBMS design! READ: transfer data from disk to main memory  (RAM). WRITE: transfer data from RAM to disk. Both are high-cost operations, relative to in-memory  operations, so must be planned carefully!
Background image of page 3

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

View Full Document Right Arrow Icon
Why Not Store Everything in Main Memory? Costs too much .   Main memory is volatile .   We want data to be saved between  runs.  (Obviously!) Typical storage hierarchy: Main memory (RAM) for currently used data. Disk for the main database (secondary storage). Tapes for archiving older versions of the data (tertiary storage).
Background image of page 4
Disks Secondary storage device of choice.  Main advantage over tapes:   random access  vs.   sequential . Data is stored and retrieved in units called  disk blocks  or  pages . Unlike RAM, time to retrieve a disk page  varies depending upon location on disk.   Therefore, relative placement of pages on disk  has major impact on DBMS performance!
Background image of page 5

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

View Full Document Right Arrow Icon
Components of a Disk  Platters  The platters spin (say, 90rps). Spindle  The arm assembly is moved in or out to  position  a head on a desired track. Tracks  under heads  make    a  cylinder   (imaginary!). Disk head Arm movement Arm assembly  Only one head reads/writes at  any one time. Tracks Sector  Block size  is a multiple             of  sector size  (which is fixed).
Background image of page 6
Accessing a Disk Page Time to access (read/write) a disk block: seek time  ( moving arms to position disk head on track ) rotational delay  ( waiting for block to rotate under head ) transfer time  ( actually moving data to/from disk surface ) Seek time and rotational delay dominate. Seek time varies from about 1 to 20msec Rotational delay varies from 0 to 10msec Transfer rate is about 1msec per 4KB page Key to lower I/O cost:  reduce seek/rotation  delays!   Hardware vs. software solutions?
Background image of page 7

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

View Full Document Right Arrow Icon
Arranging Pages on Disk ` Next ’  block concept:   blocks on same track, followed by blocks on same cylinder, followed by blocks on adjacent cylinder Blocks in a file should be arranged  sequentially on disk (by `next’), to minimize  seek and rotational delay. For a  sequential scan pre-fetching   several  pages at a time is a big win!
Background image of page 8
RAID Disk Array: Arrangement of several disks that  gives abstraction of a single, large disk.
Background image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 61

442_StorageIndexing - DBMSStorageand Indexing DiskStorage...

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

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online