lec16 - External Sorting Chapter 13 3/20/11 EECS 484:...

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

View Full Document Right Arrow Icon
1 3/20/11 EECS 484: Database Management Systems, Kristen LeFevre 1 External Sorting Chapter 13 3/20/11 EECS 484: Database Management Systems, Kristen LeFevre 2 Sorting is Common in DBMS… User wants query answers in some order E.g., ORDER BY Age DESC First step to bulk-loading B+ Tree Eliminate duplicate records SELECT DISTINCT Evaluate GROUP BY aggregate queries Sort-merge join algorithm (later)
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 3/20/11 EECS 484: Database Management Systems, Kristen LeFevre 3 What’s New? “But we already know how to sort…” New Problem: How to sort 100 GB of data with 1 GB of RAM? External Sort – Goal is to minimize disk access cost (For now, minimize # I/Os) 3/20/11 EECS 484: Database Management Systems, Kristen LeFevre 4 Common Approach: External Merge Sort Adaptation of basic in-memory merge sort Divide and conquer algorithm Intermediate results written to disk Recall basic merge sort algorithm: Base case: List of length 0 or 1 already sorted Recursive case: Divide unsorted list into two lists of equal size Sort sublists recursively by applying merge sort Merge sorted sublists back together to form one sorted list
Background image of page 2
3 3/20/11 EECS 484: Database Management Systems, Kristen LeFevre 5 Agenda Two-Way Merge Sort Simplified case (pedagogical) General External Merge Sort Takes better advantage of available memory
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2011 for the course EECS 484 taught by Professor Staff during the Winter '08 term at University of Michigan.

Page1 / 8

lec16 - External Sorting Chapter 13 3/20/11 EECS 484:...

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

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