Consider a relational table r with sufficient number of records, having attributes
\(A_{1}, A_{2},..., A_{n}\) and let \(1\leq p\leq n\)
. Two queries Q1 and Q2 are given below. \(Q1:\pi _{A_{1}....A_{n}}(\sigma _{A_{p}=c}(r))\) where c is a constant
\(Q2:\pi _{A1....A_{n}}(\sigma _{c_{1}\leq A_{p}\leq c_{2}}(r))\) where \(c_{1}\) and \(c_{2}\) are constants The database can be configured to do ordered indexing on \(A_{p}\) or hashing on \(A_{p}\).Which of the following statements is TRUE?
- AOrdered indexing will always outperform hashing for both queries
- BHashing will always outperform ordered indexing for both queries
- CHashing will outperform ordered indexing on Q1, but not on Q2
- DHashing will outperform ordered indexing on Q2, but not on Q1.