Bird
0
0

A Bitmap Index Scan is used but the query returns no rows. What is a possible explanation?

medium📝 Debug Q7 of 15
PostgreSQL - Performance Tuning
A Bitmap Index Scan is used but the query returns no rows. What is a possible explanation?
AThe index was corrupted and returned wrong results
BThe bitmap was empty, so no heap fetch occurred
CThe query syntax was invalid
DThe table was locked by another transaction
Step-by-Step Solution
Solution:
  1. Step 1: Understand empty bitmap effect

    If no rows match, bitmap is empty and no heap fetch happens, so query returns zero rows.
  2. Step 2: Exclude other causes

    Corrupted index or invalid syntax would cause errors, not empty results; locks do not affect result count.
  3. Final Answer:

    The bitmap was empty, so no heap fetch occurred -> Option B
  4. Quick Check:

    Empty bitmap means zero rows returned [OK]
Quick Trick: Empty bitmap means no rows fetched [OK]
Common Mistakes:
  • Assuming index corruption without errors
  • Confusing empty result with syntax error
  • Thinking locks affect result count

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes