Skip to content
Sharp

SQL for Java Devs · interview question

What should determine whether you add an index to a table?

Multiple choiceMediumchapter-8-curatedpremiumsql-for-java-devsindexes
Choose one answer
Answer and explanation

Correct answer

D. The dominant filter, join, and sort patterns used by real queries

Why

Index design should follow how the application actually queries the table. Good indexes support the filters and joins that dominate production workloads instead of being added generically.

Test yourself on SQL for Java Devs

A free test with instant, explained results. No account needed.

Start free test
All SQL for Java Devs questions →