Courseiva
Monitoring and TroubleshootingmediumMultiple ChoiceObjective-mapped

DBS-C01 Monitoring and Troubleshooting Practice Question

A retail company uses Amazon RDS for PostgreSQL as the backend for its e-commerce platform. During a flash sale, the database experienced high CPU utilization and increased the number of active connections. The application team reported that some queries timed out. The database specialist reviewed the slow query log and found that several queries were performing sequential scans on large tables due to missing indexes. The specialist created the necessary indexes, but the issue persists for some queries. Upon further investigation, the specialist notices that the query planner is still choosing sequential scans for some queries. What should the database specialist do to ensure the query planner uses the indexes?

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

Run the ANALYZE command to update table statistics.

Running ANALYZE updates the table statistics used by the query planner, allowing it to make informed decisions about index usage. Without updated statistics, the planner may still choose sequential scans even after indexes are created. Option A is incorrect because increasing maintenance_work_mem speeds up index creation but does not affect query planning. Option B is incorrect because decreasing random_page_cost might make indexes more attractive, but it is a global setting that could have unintended consequences and does not address the root cause of stale statistics. Option D is incorrect because disabling sequential scans (enable_seqscan=off) forces index usage but can lead to suboptimal plans, especially if the index is not the most efficient access method.

Answer analysis

Option-by-option breakdown

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

  • Increase maintenance_work_mem to speed up index creation.

    Why it's wrong here

    This does not affect query planning.

  • Decrease the random_page_cost to make indexes more attractive.

    Why it's wrong here

    This could help but is a tuning parameter; ANALYZE is the first step.

  • Run the ANALYZE command to update table statistics.

    Why this is correct

    Updated statistics help the planner use indexes.

  • Set enable_seqscan to off to force index usage.

    Why it's wrong here

    This may lead to suboptimal plans if indexes are not efficient.

About these practice questions

One of 1,663 original DBS-C01 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 DBS-C01 practice question is part of Courseiva's free Amazon Web Services 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 DBS-C01 exam.