Bird
0
0

Which column in pg_stat_user_indexes indicates how many times an index was used for scanning?

easy📝 Conceptual Q2 of 15
PostgreSQL - Indexing Strategies
Which column in pg_stat_user_indexes indicates how many times an index was used for scanning?
Aidx_scan
Bidx_tup_read
Cidx_tup_fetch
Drelid
Step-by-Step Solution
Solution:
  1. Step 1: Identify the column that counts index scans

    The idx_scan column counts how many times an index was used for scanning.
  2. Step 2: Differentiate from other columns

    idx_tup_read and idx_tup_fetch count tuples read and fetched, not scan counts. relid is the table ID.
  3. Final Answer:

    idx_scan -> Option A
  4. Quick Check:

    Index scan count = idx_scan [OK]
Quick Trick: idx_scan counts how often an index is scanned [OK]
Common Mistakes:
  • Confusing idx_tup_read with scan count
  • Choosing relid which is a table identifier
  • Mixing up idx_tup_fetch with scan count

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes