Courseiva
Data Concepts and EnvironmentshardMultiple ChoiceObjective-mapped

DA0-002 Data Concepts and Environments Practice Question

A DBA wants to improve query performance on a large table that is frequently filtered on two columns: department_id and hire_date. The table has millions of rows. Which index strategy would be most effective?

⚠ Common exam trap

Many candidates assume two separate single-column indexes are equivalent to a composite index, but they fail to realize that the database cannot efficiently combine them for range predicates without a costly index merge operation.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a composite B-tree index on (department_id, hire_date)

A composite B-tree index on (department_id, hire_date) is most effective because it allows the database to satisfy equality and range predicates on both columns in a single index scan. B-tree indexes are optimized for high-cardinality columns and support efficient multi-column filtering when the leading column matches the query's equality condition, followed by the range condition on hire_date.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a composite B-tree index on (department_id, hire_date)

    Why this is correct

    Composite index on both columns in the filter order can be used for both conditions.

  • Create a bitmap index on hire_date

    Why it's wrong here

    Bitmap indexes are for low cardinality; hire_date is high cardinality.

  • Create a hash index on department_id only

    Why it's wrong here

    Hash index doesn't support range queries on hire_date.

  • Create two separate B-tree indexes, one on each column

    Why it's wrong here

    Separate indexes may not be used together efficiently; the database may use only one index.

About these practice questions

One of 986 original DA0-002 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DA0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DA0-002 exam.