Consider a relational table $T$ with sufficient number of records having attributes $T1, T2, \dots ,Tn$ (where $1 \leq p \leq n)$
Two queries $S1$ and $S2$ are given below.
$S1: \pi T1, \dots ,Tp (\sigma Tp = c ( T ) ) \: \: \text{ [where c is a constant ] }$
$S2 : \pi T1, \dots , Tp (\sigma c1 \leq Tp \leq c2 ( T ) ) \: \: \text{ [where c1 and c2 are constants]}$
The database can be configured to do ordered indexing on Tp or hashing on Tp.
Which of the following statements is, therefore, TRUE ?
- Ordered indexing will always outperform hashing for both queries.
- Hashing will always outperform ordered indexing for both queries.
- Hashing will outperform ordered indexing on $S2$ but not $S1$.
- Hashing will outperform ordered indexing on $S1$ but not $S2$.