logo

Crowdly

Browser

Add to Chrome

A web application retrieves product data from a database and then sorts the resu...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

A web application retrieves product data from a database and then sorts the results before displaying them. Currently, the database returns all 50,000 products (no index, full table scan), and the application sorts them using a method where doubling the input quadruples the work. Two changes are proposed:

  • Change A: Switch to a sorting method where doubling the input only doubles the work
  • Change B: Add a database index so only the 200 matching products are returned

Which change addresses the larger source of wasted energy?

❌
✅
❌
❌
More questions like this

Want instant access to all verified answers on moodle.polytechnic.bh?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome