Question: There are six queries here for the DELLSTORE database, each involving a join involving some or all of the tables customers orders (invoices) orderlines (invoice_items)

There are six queries here for the DELLSTORE database, each involving a join involving some or all of the tables

customers

orders (invoices)

orderlines (invoice_items)

products (parts)

Information on the DELLSTORE database is below. You can enable a more vertical output format with the psql command \x on if you wish. For each of the queries below, 1-6, you should do the following regarding the Postgres query plan:

Give me the Postgres explain output that you get from your machine

Interpret this output to give me the exact join order (which may be a tree structure):

What is the first pair of tables joined? What is the algorithm?

What is the order of each subsequent join?

Answer the additional questions 2-6 (there is no additional question for join 1)

4. Range match on products.price explain select c.lastname from customers c join orders o on c.customerid = o.customerid join orderlines ol on o.orderid = ol.orderid join products p on ol.prod_id = p.prod_id where p.price < 10.0; Question 4: As you increase the price threshold from 10.0, at some point the query plan changes. At what price threshold (to at least one decimal place) does the query plan first change? 11.0? 12.0? 12.5? You're looking for a change in the join order, not something more superficial. Here's a possible join-order change: ((orderlines join products) join (orders join customers) Also, as part of your answer, let me know if you have a solid-state drive or a spinning-iron drive. It matters! (Possibly.)

http://pld.cs.luc.edu/courses/305/spr16/dellexplain.html

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!