Question

1. Query Processing (30 pts): A file of 4096 blocks is to be sorted with an available buffer space of 5 blocks. Assume that reading a block has 1 unit cost and writing a block has 1 unit cost. What is...

1. Query Processing (30 pts): A file of 4096 blocks is to be sorted with an available buffer space of 5 blocks. Assume that reading a block has 1 unit cost and writing a block has 1 unit cost.

What is the minimal cost of the sort-merge algorithm in units?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let n be number of runs in merge phase

Given, number of blocks in file, b = 4096

Available buffer size, a = 5

now, n = b/a = 4096/5 = 819

Degree of Merging = x = Min(n,a-1) = Min(819,4) = 4

Number of passes in merge phase = Logxn = Log4819 = 4.84

therefore cost of sort-merge algorithm in units = 4.84*2*4096 = 39649.28

Add a comment
Know the answer?
Add Answer to:
1. Query Processing (30 pts): A file of 4096 blocks is to be sorted with an available buffer space of 5 blocks. Assume that reading a block has 1 unit cost and writing a block has 1 unit cost. What is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Assume a sorted relation has 40 GB (file size), block size is 4KB, each block stores 40 records. ...

    Assume a sorted relation has 40 GB (file size), block size is 4KB, each block stores 40 records. Assume the index B+ tree has entries for each record, and the fanout of the node for B+ tree is 100. Select with an equality condition on the attribute, search key of index. Assume the disk seek cost is 5 milliseconds, and block transfer cost is 1 milliseconds. Also assume if the selection is a non key attribute, there are 100 matching...

  • Question 1 (5 marks) Consider two relations called Item and Orderltem. Imagine that relation Item has 160,000 tuples and Orderltem has 200,000 tuples. Both relations store 100 tuples per a page....

    Question 1 (5 marks) Consider two relations called Item and Orderltem. Imagine that relation Item has 160,000 tuples and Orderltem has 200,000 tuples. Both relations store 100 tuples per a page. Consider the following SQL statement SELECT * FROM Item INNER JOIN OrderItem ON Item.ItemID-OrderItem. ItemID; We wish to evaluate an equijoin between Orderltem and Item, with an equality condition Item.ltemID Orderltem.ItemID. There are 802 buffer pages available in memory for this operation. Both relations are stored as (unsorted) heap...

  • 1. If Job Q included 30 units, what was its unit product cost? 2. Assume that...

    1. If Job Q included 30 units, what was its unit product cost? 2. Assume that Sweeten Company used cost-plus pricing (and a markup percentage of 80% of total manufacturing cost) to establish selling prices for all of its jobs. What selling price would the company have established for Jobs P and Q? What are the selling prices for both jobs when stated on a per unit basis assuming 20 units were produced for Job P and 30 units were...

  • 5 pts Question 1 Norred Corporation has provided the following information: Cost per Unit Cost per...

    5 pts Question 1 Norred Corporation has provided the following information: Cost per Unit Cost per Period $ Direct materials 7.50 Direct labor $ 3.70 Variable manufacturing overhead $ 1.60 Fixed manufacturing overhead $ 121,500 Sales commissions $ 1.50 Variable administrative expense $ 0.45 Fixed selling and administrative expense $ 44,500 If 8,000 units are produced the total amount of indirect manufacturing cost incurred is closest to: O $12.800 O $134.300 $135.900 O $121,500 Question 2 5

  • 13. If Job Q included 30 units, what was its unit product cost? 14. Assume that...

    13. If Job Q included 30 units, what was its unit product cost? 14. Assume that Sweeten Company used cost-plus pricing (and a markup percentage of 80% of total manufacturing cost) to establish selling prices for all of its jobs. What selling price would the company have established for Jobs P and Q? What are the selling prices for both jobs when stated on a per unit basis assuming 20 units were produced for Job P and 30 units were...

  • CORRECTED: ABC ORIGINAL PROBLEM DATA (18I Excel File: CHECK FIGURES: AX40 Traditional Unit Cost: $62.75 EX90...

    CORRECTED: ABC ORIGINAL PROBLEM DATA (18I Excel File: CHECK FIGURES: AX40 Traditional Unit Cost: $62.75 EX90 ABC Unit Cost: $116.80 For several years, Adria Manufacturing has produced a single product called AX40. Then two years ago, the company automated a portion of its plant and at the same time introduced a second product called EX90 which has become increasingly popular. The EX90 is a more complex product, requiring one hour of direct labor time per unit to manufacture and extensive...

  • Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around...

    Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT