What will be the total i/o cost for sorting this file

Assignment Help Basic Computer Science
Reference no: EM131210923

Suppose that you just finished inserting several records into a heap file, and now you want to sort those records. Assume that the DBMS uses external sort and makes efficient use of the available buffer space when it sorts a file. Here is some potentially useful information about the newly loaded file and the DBMS software that is available to operate on it:
The number of records in the file is 4,500. The sort key for the file is four bytes long. You can assume that rids are eight bytes long and page ids are four bytes long. Each record is a total of 48 bytes long. The page size is 512 bytes. Each page has 12 bytes of control information on it. Four buffer pages are available.

1. How many sorted subfiles will there be after the initial pass of the sort, and how long will each subfile be?

2. How many passes (including the initial pass considered above) will be required to sort this file?

3. What will be the total I/O cost for sorting this file?

4. What is the largest file, in terms of the number of records, that you can sort with just four buffer pages in two passes? How would your answer change if you had 257 buffer pages?

5. Suppose that you have a B+ tree index with the search key being the same as the desired sort key. Find the cost of using the index to retrieve the records in sorted order for each of the following cases:

? The index uses Alternative (1) for data entries.

? The index uses Alternative (2) and is not clustered. (You can compute the worstcase cost in this case.)

? How would the costs of using the index change if the file is the largest that you can sort in two passes of external sort with 257 buffer pages? Give your answer for both clustered and unclustered indexes.

Reference no: EM131210923

Questions Cloud

System performance in queuing analysis : What are the most common measurements of system performance in queuing analysis?
How many passes will it take to sort the file completely : How many buffer pages do you need to sort the file completely in just two passes?
Determining the confidence interval : A research firm conducted a survey to determine the mean amount steady smokers spend on cigarettes during a week.  A sample of 64 smokers revealed that = $20 and S = $5.  What is the 95% confidence interval for μ?
What are the components of quality : What 3 ways can you create quality within the healthcare organization for the patient? Who are your customers and what does it take to satisfy the customer? What are the customers service expectations and how do they vary between the different types ..
What will be the total i/o cost for sorting this file : What is the largest file, in terms of the number of records, that you can sort with just four buffer pages in two passes? How would your answer change if you had 257 buffer pages?
How would the bank benefit from transfer of credit risk : How would you measure credit risk at the bank? Be sure to discuss techniques for measuring individual credit products and commercial credit products. How would the bank benefit from transfer of credit risk?
Show puglias economy using a graph : Show Puglia's economy, using a graph with a production-possibility curve and community indifference curves.- Which product will Puglia export?
Positive skewed normal distribution : What are the key components needed to determine if you have a positive skewed normal distribution?
Explain your position on the statement : Discuss any potential legal or ethical issues that might be encountered if this type of policy is implemented. Based on your position, what issues might you run into in your meeting?

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Write a program that measures the bandwidth provided by pipe

After all data has been read, the parent should print the elapsed time required and the bandwidth (bytes transferred per second). Measure the bandwidth for different data block sizes

  Evaluate the megatrend of demographics in the it field

Evaluate the megatrend of demographics in the IT field. Give your opinion as to why IT managers must understand this megatrend when selecting talent for organizational positions.

  Represents the amount of balloon animals

If he can make 3 balloon animals every 2 minutes, write an expression using the ceiling function or floor function that represents the amount of balloon animals that he creates in m minutes.

  What are cautions regarding use of bold type as text stimuli

What are the guidelines and cautions regarding the use of bold type as text stimuli?

  T & corporate transformation course assignment

T & Corporate transformation course assignment:

  Football trajectory equation

Consider a basketball being dribbled. If the height of the basketball can be described by a sine wave of maximum height 2h, average height h and minimum height 0, and the ball hits the ground once per second, how fast would a video camera have to ..

  Propose a modification to the delivery mechanism

Propose a modification to the delivery mechanism that does allow for reversibility. Your mechanism should not require giving all switches globally unique names.

  What is required to apply it into business

Does business need IT? Why IT is important for business survival? What is required to apply IT into business? (Cost, planning, designing, equipment, installation, training, etc) How does business use IT? (internally such as staff, employees, and exte..

  Fund the mobile application using either the allocation

The Finance department has 30 employees. The CIO has decided to fund the mobile application using either the allocation method or chargeback method. Which funding method does each department wish the CIO will choose to use and why?

  What is the probability p[g = r]

what is the probability P[G = R]?

  Both the userid and the person''s full name

a report and not just a listing:The report might be created with awk but it should have a heading. it should list both the userid and the person's full name (a person's fullname can be found in /etc/passwd file)

  Highlight element enables highlight the text.true or false

The highlight element enables you to highlight the text. True or False

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd