Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a file containing 200 million (i.e., 200 10 6 ) song reviews: revid (8 bytes), sname (40 bytes), rating (2 bytes), comments (40 bytes).

Consider a file containing 200 million (i.e., 200 106) song reviews: revid (8 bytes), sname (40 bytes), rating (2 bytes), comments (40 bytes). Suppose it is stored unsplit on a disk which features the following average times: seek = 7 ms, rotational delay = 8 ms. In addition, the time to read/write a page = 0.5 ms. Page size is 4K (4 210 bytes). You have an available memory (i.e., buffer pool) of 20M (20 220 bytes) for (a)(c).

(a) What is the elapsed time for phase 1 (sort phase)?

(b) How many merge passes are needed in phase 2 if you decide to merge as many SSLs as possible at a time?

(c) What is the elapsed time for the merge phase? Make sure to allocate the pages to the various buffers so as to optimize random accesses. Show the allocation details for every pass. Develop your work carefully, showing the # random accesses and # sequential accesses, before converting to elapsed time.

(d) What is the smallest buffer pool which will let you sort the above file while minimizing the # passes in phase 2? Express your answer in # pages and in # bytes. Show your work.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions