Question: Optimize the following SQL query on the Company Database to find names of employees earning over $30,000 per year, names of projects on which they

Optimize the following SQL query on the Company Database to find names of employees earning over $30,000 per year, names of projects on which they work more than 12 hours per week, among projects that are located in Houston. Select E.lname, E.fname, P.pname, W.hours From project P, employee E, works_on W Where E.ssn = W.ssn and W.pno = P.pno and P.plocation = 'Houston' and W.hours > 12 and E.salary > 30000 Start with an initial query tree generated by the parser that uses left associativity for joins. Show the query tree after each major step of the algorithm. Show the query execution plan of the optimized query. 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!