846. Avoid SELECT * in API — performance case 2

DBMS Published Updated 0 Views Verified
Write the MySQL query/DDL and explain the performance-sensitive choice. Consider WHERE/JOIN/ORDER BY usage and write overhead.
Looking for the latest Sarkari Result 2026 updates? Check the latest government exam results, merit lists and result updates on Sarkari Resultess.
Sarkari Resultess
Questions & Answers

Answer & Explanation

4 Answers
Verified

Option A

Add an index to every column without checking workload.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 1
Verified

Option B

Wrap the indexed column in a function unnecessarily.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 2
Verified

Option C

Use OFFSET 999999 for every large-page request.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 3
Verified Correct Answer

Option D

SELECT id,name,price FROM products WHERE status='active' LIMIT 50;
Additional Explanation
Correct implementation. Prefer parameterized queries in application code, validate affected rows for UPDATE/DELETE, and use transactions for related writes.
Sarkari Resultess
Editorial Answer 4