edited by
580 views
2 votes
2 votes

Two queries equivalent to each other are specified for a relation $R(A, B, C, D, E, F)$. The queries are:

  • $\pi_{A,B,C}(\sigma B>500(R))$
  • $\sigma B>500(\pi_{A,B,C}(R))$

The system maintains a $B+$ tree index for $(A, B, C)$ on $R$. However, the index is unclustered. The relation $R$ occupies $100$ pages and the index structure needs $5$ pages only. Compute the number of disk accesses required for each of the queries and thereby decide which one of the two queries will be preferred by the query optimizer for minimum cost of execution. The cost of query execution is primarily dependent on the number of disk accesses.

edited by

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
2
go_editor asked May 31, 2016
637 views
Consider a uniprocessor system with four processes having the following arrival and burst times:$$\begin{array}{|c|c|c|l|} \hline&\text{Arrival Time}&\text{CPU Burst Time...