retagged by
300 views
3 votes
3 votes

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 ?

  1. Ordered indexing will always outperform hashing for both queries.
  2. Hashing will always outperform ordered indexing for both queries.
  3. Hashing will outperform ordered indexing on $S2$ but not $S1$.
  4. Hashing will outperform ordered indexing on $S1$ but not $S2$.
retagged by

1 Answer

Answer:

Related questions

0 votes
0 votes
1 answer
1
3 votes
3 votes
2 answers
2
Bikram asked Aug 26, 2017
409 views
$\sigma_{A=B \text{ and } B=C \text{ and } C=A} \bigg( \Pi_A (R) \times \Pi_B (R) \times \Pi_C (R) \bigg)$The number of rows returned by the above relational algebraic ex...