Multiple choice technology databases

Which of the below statement is worth creating an index

  1. The table is small

  2. The columns are often used as a condition in the query

  3. Most queries are expected to retrieve more than 2 to 4 percent of the rows in the table

  4. The table is updated frequently

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Indexes speed up queries when columns appear frequently in WHERE clauses, JOIN conditions, or ORDER BY statements. Small tables don't benefit enough to justify index overhead, and tables updated frequently suffer from index maintenance costs. When queries return more than 2-4% of rows, a full table scan is usually more efficient than using an index.