logo

Crowdly

Browser

Додати до Chrome

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

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

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?

Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.polytechnic.bh?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome