Question: Review six queries that require optimization . 1. SELECT Order.CustomerID, Product.ProductID, OrderDetail.OrderID FROM Product, OrderDetail, Order WHERE Order.OrderID = OrderDetail.OrderID AND OrderDetail.ProductID = Product.ProductID AND

Review six queries that require optimization .

1. SELECT Order.CustomerID, Product.ProductID, OrderDetail.OrderID

FROM Product, OrderDetail, Order

WHERE Order.OrderID = OrderDetail.OrderID AND OrderDetail.ProductID = Product.ProductID AND OrderDetail.Price = 50

a. Optimize query performance using appropriate strategies (that is, optimizer hints, additional indices, changing the query search arguments, or some combination thereof as appropriate).

b. Explain briefly why you chose the strategies that you employed.

2. SELECT Order.CustomerID, Product.ProductID, OrderDetail.OrderID

FROM Product, OrderDetail, Order

WHERE Order.OrderID = OrderDetail.OrderID AND OrderDetail.ProductID = Product.ProductID AND CustomerID < 100 AND Quantity = 1

a. Optimize query performance using appropriate strategies (that is, optimizer hints, additional indices, changing the query search arguments, or some combination thereof as appropriate).

b. Explain briefly why you chose the strategies that you employed.

3. SELECT Customer.FirstName, Customer.LastName, Product.ProductName, OrderDetail.Quantity, OrderDetail.Price

FROM Customer, Order, OrderDetail, Product

WHERE Customer.CustomerID = Order.CustomerID

AND Order.OrderID = OrderDetail.OrderID

AND OrderDetail.ProductID = Product.ProductID

AND ProductID NOT IN (1, 2, 3, 4, 5, 6, 7)

a. Optimize query performance using appropriate strategies (that is, optimizer hints, additional indices, changing the query search arguments, or some combination thereof as appropriate).

b. Explain briefly why you chose the strategies that you employed.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Certainly Ill review the six queries and suggest optimization strategies for each one Query 1 SELECT OrderCustomerID ProductProductID OrderDe... View full answer

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!