Consider a relational table r with sufficient number of records, having attributes A1, A2,…, An and let 1 <= p <= n. Two queries Q1 and Q2 are given below.
The database can be configured to do ordered indexing on Ap or hashing on Ap. Which of the following statements is TRUE?
(A) Ordered indexing will always outperform hashing for both queries
(B) Hashing will always outperform ordered indexing for both queries
(C) Hashing will outperform ordered indexing on Q1, but not on Q2
(D) Hashing will outperform ordered indexing on Q2, but not on Q1.
Answer: (C)
Explanation: If record are accessed for a particular value from table, hashing will do better. If records are accessed in a range of values, ordered indexing will perform better. See this for more details.
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 2011 | Question 1
- GATE | GATE CS 2011 | Question 2
- GATE | GATE CS 2011 | Question 3
- GATE | GATE CS 2011 | Question 4
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 6
- GATE | GATE CS 2011 | Question 7
- GATE | GATE CS 2011 | Question 8
- GATE | GATE CS 2011 | Question 9
- GATE | GATE CS 2011 | Question 10
- GATE | GATE CS 2011 | Question 11
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 13
- GATE | GATE CS 2011 | Question 14
- GATE | GATE CS 2011 | Question 15
- GATE | GATE CS 2011 | Question 16
- GATE | GATE CS 2011 | Question 17
- GATE | GATE CS 2011 | Question 18
- GATE | GATE CS 2011 | Question 19
- GATE | GATE CS 2011 | Question 65

