Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1 2 pts The Human Resources Department needs to quickly find the start

ID: 3814238 • Letter: Q

Question

Question 1 2 pts The Human Resources Department needs to quickly find the start and end date for Salespersons. To do this they run the following query. They specify different dates depending on specific needs. The response is slow. What can be done to improve on the performance of the query SELECT lastname, firstname, startdate, enddate FROM salesperson WHERE startdate BETWEEN #1/1/2010# AND #12/31/2010# AND enddate BETWEEN #1/1/2010# AND #12/31/2010# O Vertically partition the Salesperson table. O Horizontally partition the Salesperson table. O Put an index on the Startdate and EndDate columns. O Create a view.

Explanation / Answer

1) To retrieve the records frequently based on some certain column, we should keep the index on those column so that the retrieval would be fast as it creates the index table on that column and directly gets the access of the record.
So here it needs to create index on Standate and EndDate Columns.

2) Create a view that contains only the customer rows for French customer, in this case the rerieval of the customer from france would be fase as it need not search the entore table of customer.

3) By Creating a covering index that adds the quantity to an index for productid then the query engine doesn't have to lookup the table again which can significantly increase the performance of the query.


4) As by horizontally partition on the Order table based on the select clause would reduce the amount of data it contains in teh Order table and by doing vertical partion on OrderProduct table will keep only the required column for projection. So Horizontally partion the Order table and Vertically partition the OrderProduct table can speedup the query.

5) If we create a covering index on vendorname which include the phonenum then the query engine doesn't have to lookup the table again which can significantly increase the performance of the query.

6) By Creating Cluster on Sales table can improve the access to the sales table.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote