GATE 2011 CS (CS1) – Question 49
A large relation r has attributes A₁,…,Aₙ. Q₁ projects A₁,…,Aₙ after selecting Aₚ=c. Q₂ projects them after selecting c₁≤Aₚ≤c₂. Compare ordered indexing and hashing on Aₚ.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) Hashing wins on Q₁ but not Q₂
Explanation
Hashing directly locates equality buckets, suiting Q₁. A range query requires ordered traversal across adjacent keys, which an ordered index supports and hashing does not. Thus C is the conventional access-pattern comparison. Actual selectivity and cache state can affect measured performance; the source asks the structural indexing advantage.
More File Organization and Indexing (B and B+ Trees) questions
- GATE 2010 CS (CS1) Q28
- GATE 2015 CS (CS2) Q32
- GATE 2015 CS (CS3) Q39
- GATE 2021 CS (CS2) Q31
- GATE 2026 CS (CS2) Q46
- GATE 2025 CS (CS1) Q21
All File Organization and Indexing (B and B+ Trees) questions →