consider the following relation: employees(eid: integer, sal: real, age: real, did: integer), where attribute eid is the primary key of the relation. employees is stored as a heap file. there is a hash index on did and also a b -tree index on sal. according to the database catalogs, employees has 50,000 tuples, in 1,000 disk blocks (i.e., each disk block holds 50 employees tuples). attribute sal has values between 30,000 and 100,000; attribute did has 1,000 distinct values in employees. consider a query: ELECT * FROM Employees
E
WHERE E.sal
>31,000
AND E.sal
<32,000
AND E.did
=123
Answer the following questions using the methodology and assumptions from our analysis in the lectures: a. Describe an execution plan for the query above that does not use any indexes. Report the estimated total number of
I/Os
required for the plan. Justify your answer. b. Describe an execution plan for the query above that uses the index on did and no other indexes. Report the estimated total number of I/Os required for the plan. (Again, use the methodology and assumptions from our analysis in the lectures.) Justify your answer. c. Describe an execution plan for the query above that uses the index on sal and no other indexes. Report the estimated total number of I/Os required for the plan. (Again, use the methodology and assumptions from our analysis in the lectures.) Justify your answer.
Previous question